
On 26 September 2011 11:33, Dave Abrahams <dave@boostpro.com> wrote:
on Mon Sep 26 2011, Andrew Sutton <asutton.list-AT-gmail.com> wrote:
It seems to me that a clamp_range is just:
std::transform ( begin, end, out, clamp ( _1, lo, hi ))
is that what you meant?
Sorry... this got lost in the thread. That looks like the right implementation, but it might be nice to provide an interface for it:
template<typename Iter, typename T> void clamp_range(Iter first, Iter last, cont T& high, const T& low)
IMO it clearly should be:
template<typename Iter> void clamp_range( Iter first, Iter last, typename itertor_traits<Iter>::value_type const& high, typename itertor_traits<Iter>::value_type const& low)
--
+1. Can you go suggest to the committee and change find as well? :) - C