Boost logo

Boost :

From: Pavol Droba (droba_at_[hidden])
Date: 2003-11-03 06:17:11


On Mon, Nov 03, 2003 at 09:09:34PM +1100, Thorsten Ottosen wrote:

[snip]

> > Sure, we can use std::pair. iterator_range is not supposed to add much
> > more. Only I find
> > it a way more clean an easier to use, because, you need to specify only
> > one template argument
> > (unlike in confusing pair) and the name denotes what is the semantic value
> > of the contained
> > pair of iterators.
>
> Please tell me what the invariant of iterator_range is suposed to be and
> then justify why
> reverse() don't break it. If it does, the operation does not make sense, and
> then there seem to be no
> reason why this could not be a generic range.

Well reverse was only added to simplyfy the handling for reverese_itarator.

I don't know about any reason why it should be a generic range. What benefits
whould it bring?
 
> > Adding additional functionality and meaning to the iterator_range will
> > break its original
> > purpose.
> >
> so far we don't know what the purpose is.
>
It's purpose is to encapsulate a pair of iterators delimiting a range in a container.

Regards,

Pavol


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