
26 Sep
2011
26 Sep
'11
6:17 p.m.
2011/9/27 Peter Dimov <pdimov@pdimov.com>
Dave Abrahams wrote:
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)
Then clamp should be
template<class T> T clamp( T const & value, typename identity<T>::type const & low, typename identity<T>::type const & high );
I second this. BTW, The return type could be T const&.