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:
std::map foo; for (const auto& any : foo) { MyClass *j = any.second; j->bar(); }
in c++11 (also known as c++0x), you can do this like in C# and Java