|
Boost : |
From: John Torjo (john.lists_at_[hidden])
Date: 2005-02-03 03:12:32
Hi Thorsten,
>
> iterator_range:
> --------------
>
> value_type& front() const;
> value_type& back() const;
> value_type& operator[]( size_type ) const;
I'm all for having these.
> value_type& at( size_type ) const;
I'm don't very much like having a throwing at() function.
But this comes from the fact that I don't like vector's at() either.
So, you can think of me as neutral on this one.
>
> void advance( size_type );
> void narrow( size_type left, size_type right );
I don't like these. I think this is much easier accomplished with the
freestanding functions.
> iterator_range& operator++();
> value_type& operator*() const;
I'm all for it :)
Out of curiosity, will you have ++pre and post++?
>
> sub_range:
> ----------
>
same as above
>
> freestanding:
> ------------
>
> iterator_range make_sub_range( range&, size_type left, size_type right = 0 );
> iterator_range make_super_range( range&, size_type left, size_type right =
> 0 );
> iterator_range make_range( range&, difference_type left, difference_type right
> = 0 );
Yup, I'm all for all ;) My favorite would be the last one, and I've been
meaning to implement it myself for rangelib.
Best,
John
-- John Torjo, Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/ -v1.6.3 (Resource Splitter) -- http://www.torjo.com/cb/ - Click, Build, Run!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk