Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-02-01 18:38:31


Thorsten Ottosen wrote:
> "Jonathan Turkanis" <technews_at_[hidden]> wrote in message
> news:ctoves$kg0$1_at_sea.gmane.org...
>> Thorsten Ottosen wrote:

Thanks for the clarifications.

>> iterator_range make_sub_range( range&, size_type left, size_type
>> right = 0 );
>
> advances begin(r) and decreases end(r)
> to produce a smaller range

Since you have a template iterator_range and a corresponding object generator
amke_iterator_range, I would expect make_sub_range to be an object generator
returning a sub_range.

So I would prefer the name "restrict_range"

>> iterator_range make_super_range( range&, size_type left,
>> size_type right = 0 );
>
> decreases begin(r) and advances end(r)
> to produce a larger range

 How about "extend_range"?

>> iterator_range make_range( range&, difference_type left,
>> difference_type right = 0 );
>
> does advance( begin(r), left ) and advance( end(r), right )
> and is thus the most general.

I'm not sure I see why you need all three functions, particularly this last one.

> -Thorsten

Jonathan


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