Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-02-14 09:01:27


"Eyal Farago" <eyal.farago_at_[hidden]> wrote in message
news:BC29F2A417B44F44BD3AA1AD9868CEDC034244_at_ilexchange.adrembi.com...
| you can easily achieve this using (make_)transform_iterator and boost bind:
|
| make_transform_iterator(
| map.begin(),
| boost::bind( &MAP_TYPE::value_type::first, _1 )
| )
|
| (give or take a typename before MAP_TYPE::...)
| I think it's so simple that you don't really need a utility class for it.

well, I cannot use that when I want to write a manual loop.

yes, it is simple, but also frequently used. And we also
have to think about less experienced users IMO.

-Thorsten


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