
Hi, 2012/7/26 Igor Lubashev <igorlord@alum.mit.edu>:
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. http://www.boost.org/doc/libs/1_50_0/libs/range/doc/html/range/reference/ada... http://www.boost.org/doc/libs/1_50_0/libs/range/doc/html/range/reference/ada... and Range Extension (in formal review queue) has more feature. http://dl.dropbox.com/u/1682460/git/OvenToBoost/libs/range/doc/html/range_ex... http://dl.dropbox.com/u/1682460/git/OvenToBoost/libs/range/doc/html/range_ex...
======================== Akira Takahashi mailto:faithandbrave@gmail.com site: https://sites.google.com/site/faithandbrave/about/en