From: John Torjo (john.lists_at_[hidden])
Date: 2003-11-20 20:47:47
Brian McNamara wrote:
> On Thu, Nov 20, 2003 at 09:48:34AM -0800, John Torjo wrote:
>>>You may be interested to read
>>Yup, read it.
>>As a matter of fact, the range thing has been on my mind for quite a few
>>years as well.
>>The crange class is (a little better) interval ;)
>>However, I donot think that algorithms should operate on intervals, because
>>usually this makes harder for them to work.
> The way I see it, an "interval" or "range" or whatever is just an
> abstraction for a pair of iterators. You can have "range categories"
> just like "iterator categories", so that algorithms can take advantage
> of the specific propoerties of iterators/ranges. (E.g., some intervals
> may support random access, whereas other might not.)
Exactly! The "interval" or "range" is just a convenience.
However, there are times when having a 'traversal_range' (see my reply to
AlisdairM) does not imply two iterators.
Anyway, a traversal_range can be transformed into two iterators ;)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk