Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-02-02 17:32:15


"Jonathan Turkanis" <technews_at_[hidden]> wrote in message
news:ctp3dr$efm$1_at_sea.gmane.org...
| 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.

that is true...maybe we should add those?

| 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"?

maybe narrow_range() and widen_range() and then cut away the
narrow member function?

| >> 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.

yeah, I suspect that it would used infrequently. I just wanted to hear
what you all thought.

br

-Thorsten


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