Is it possible to iterate over all of the values in a std::map using just a "foreach"?
std::map
This is my current code:
The magic lies with Boost.Range's map_values adaptor:
#include for(auto&& i : foo | boost::adaptors::map_values){ i->bar(); }
And it's officially called a "range-based for loop", not a "foreach loop". :)