I have a map where I\'d like to perform a call on every data type object member function. I yet know how to do this on any sequence but, is it possible to do it on an associativ
Will it work for you ?
class MyClass; typedef std::pair MyPair; class MyClass { private: void foo() const{}; public: static void Method(MyPair const& p) { //...... p.second.foo(); }; }; // ... std::map Map; //..... std::for_each(Map.begin(), Map.end(), (&MyClass::Method));