Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-05-11 08:20:26


"David Abrahams" <dave_at_[hidden]> wrote in message
news:u1x8eapu4.fsf_at_boost-consulting.com...
| "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
|
| > it wouldn't work with pair<iterator,iterator> without an adapter.
|
| I'm not convinced that's such an important capability.

it is all about syntax, and it's not just pair<iterator,iterator>
but users own types too.

we could demand that

using std::make_range;
for( const suto& r : make_range( expression ) )
    {...}

was the generic solution, but the amount of work it takes to include
<iterator>
is certainly not great.

also, member functions are worse at forwarding than free-standing.

-Thorsten


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