|
Boost : |
Subject: Re: [boost] [Review:Algorithms] Order of args to clamp
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-09-26 14:02:58
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk