Boost logo

Boost :

Subject: Re: [boost] [iterators]: collection_keys and collection_values
From: Akira Takahashi (faithandbrave_at_[hidden])
Date: 2012-07-25 21:17:36


2012/7/26 Igor Lubashev <igorlord_at_[hidden]>:
> I'd like to propose adding collection_keys and collection_values to iterators library.
> ======== Motivation ========
> I find myself very often having to iterate over all keys or values of a map (or multimap). The best I can do is to use BOOST_FOREACH to iterate over the collection value_type pairs and then work with .first or .second. That makes for awkward and unclear code.

Boost.Range has map_keys and map_values range adaptors.

and Range Extension (in formal review queue) has more feature.

Akira Takahashi

Boost list run by bdawes at, gregod at, cpdaniel at, john at