From: John Torjo (john.lists_at_[hidden])
Date: 2003-11-20 19:08:49
>>The idea I am pushing for here is that ranges ARE NOT pairs of
>>iterators. Rather, a pair of iterators happens to make a good
>>representation of a range, but may not be the only one.
> I'd like to second this idea, though with a different motivation:
> What about "ranges" that reference a container or another range instead of
Basically, I see ranges that reference a container as actually refering to
container.begin() and container.end()
> containing two iterators? Ranges of this kind are also known as "views"
> and can be quite useful in some situations. The main difference is
indeed, they're already implemented;)
And yes, they *are* very useful - I'm aleady happily using them.
You do make a strong point for "views" - such ranges should never be reset. In
other words, they are initialized in their constructor. Afterwards, they cannot
be changed, just traversed. Right?
> iterator/range invalidation and ownership management, and becomes
> relevant once you store ranges for using them later on. By requiring that
> a range is defined by two iterators views would be left out, even though
I'm not sure I follow...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk