Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-01-22 02:54:50


Jan Gaspar skrev:

> I can change it in the trunk but I'm not sure I should chage it in the 1.35 release branch at this stage.

yeah, we should probably leave the release branch alone, except for
triviality.

> #2
> Coud you show the example how do you want to get the special iterator?

If I were to use the array_one() or array_two() functions, I would need
to know which one that spanned the buffer given is_linearized() was
true. (I pressume it would be array_one()). But, since the interface
already exposes both normal and reverse iterators, it would be cool if
it also worked for reverse iterators.

In Boost.Iterator, the wrapped iterators are accessible as iter.base(),
and I think it makes sense to reuse that scheme, just with a slightly
different name.

So if is_linearized() is true, the following efficient ranges could be
valid:

[begin().array_ptr(),end().array_ptr())
[rbegin().array_ptr(),rend().array_ptr())

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk