
26 Sep
2011
26 Sep
'11
6:02 p.m.
AMDG On 09/26/2011 10:40 AM, Marshall Clow wrote:
On Sep 26, 2011, at 9:33 AM, Dave Abrahams wrote:
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)
BTW, clamp_range defined like this fails on the following code:
int inputs [] = { 0, 1, 2, 3, 4 }; clamp_range ( &inputs[0], &inputs[5], 2, 4 );
because pointers are not iterators.
Yes they are. In Christ, Steven Watanabe