
14 May
2010
14 May
'10
9:33 p.m.
Hi all, Why isn't there a mapped_type/key_type iterator adaptor in boost? (Just in case it's not clear, something which allow one to iterator over the keys or the mapped-values of a map/multimap.) I would think this is a pretty common need. By the way, going through the archives this is all I could dig up: http://thread.gmane.org/gmane.comp.lib.boost.devel/117946 Additionaly something with a clearer syntax than the following would be great: make_transform_iterator( map.begin(), boost::bind( &MAP_TYPE::value_type::first, _1 )) ie, something along the lines of: take_mapped_type(map.begin()) Thanks, -Mostafa