|
Boost : |
From: Michiel Salters (Michiel.Salters_at_[hidden])
Date: 2002-02-21 04:10:20
> -----Original Message-----
> From: dietmar_kuehl [mailto:dietmar_kuehl_at_[hidden]]
> Sent: dinsdag 19 februari 2002 12:56
> To: boost_at_[hidden]
> Subject: [boost] Re: Most needed/desired features in C++
>
> Other than this, I think that STL usage would become easier if
> sequences could optionally be specified as something which looks
> like a 'std::pair<>' of iterators (ie. has member 'first' and
> 'second' to represent the begin and [past] the end iterators,
> respectively): This is rather handy if you have functions producing
> sequences which are then in turn to be used as input to functions
> taking sequence.
Is there a reason you want to have an end iterator, instead of an
at_end( iterator ) function ? Implementing the latter in terms of the
former is trivial, but all you have is the at_end( ) functionality, you
need a special singular iterator to signal at_end( ), which can make
all iterators bigger. Furthermore, for many output iterators, at_end( )
is trivially implemented as "return false;". The corresponding
iterator is much more work.
-- Michiel Salters Consultant Software Engineering CMG RTSE1 Michiel.Salters_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk