|
Boost : |
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2005-02-02 07:26:55
Thorsten Ottosen writes:
> I have planned to add a few extra convenience function to
> iterator_range and sub_range. Some people have said the classes
> could have been a little easier to use. The changes I suggest are the
> following:
>
> iterator_range:
> --------------
>
> value_type& front() const;
> value_type& back() const;
> value_type& operator[]( size_type ) const;
Assuming that 'operator[]' is provided only for Random Access
iterators, the above three are very reasonable.
> value_type& at( size_type ) const;
Is it a checked version of 'operator[]'?
> void advance( size_type );
> void narrow( size_type left, size_type right );
> iterator_range& operator++();
> value_type& operator*() const;
Please NO. 'narrow' can be a freestanding utility function, and the
rest is at best a questionable "convenience" baggage with no value for
generic code. Also, think "standardization".
-- Aleksey Gurtovoy MetaCommunications Engineering
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk