|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-06-03 15:26:18
Neal Becker wrote:
> Peter Dimov wrote:
>
>> Neal Becker wrote:
>>
>>> Here's my version:
>>
>> [...]
>>
>> One interesting problem with strided iterators is coming up with end
>> values. Suppose you have
>>
>> int x[ 4 ];
>>
>> and you want to iterate over x[1] and x[3] with stride 2. Your begin
>> iterator will be x+1, and your end iterator will be x+5 - an invalid
>> address.
>
> Yup. Simple solution: Don't do that.
Don't do what? Use a strided iterator?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk