|
Boost : |
From: Shunsuke Sogame (mb2act_at_[hidden])
Date: 2006-04-10 02:40:42
Ion Gaztañaga wrote:
>>You haven't really explained what this thing is supposed to be doing.
>>As far as I can tell from the code, it dereferences to the same
>>location at each position. If that's really what you intend, you
>>ought to do something to ensure that its iterator category doesn't
>>indicate it satisfies forward iterator requirements.
>
>
> A pair of "range_from_ref_iterator" simulates a pair of random access
> iterators that point to an array of N identical values.
Let me note that, that iterator, illegal or not, can be more generalized.
copy(rng|repeated(12), outIter);
I mean your iterator should take not a value but a range(iterator pair)
as the argument of the constructor.
Thus,
copy(make_identity_range(x)|repeated(12), outIter);
-- Shunsuke Sogame
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk