for_each 使用总结
classMyClass{public:voidMethod()const;}
std::map<int,MyClass>Map;//...
std::vector<MyClass*>Vector;
std::transform(Map.begin(),Map.end(), std::back_inserter(Vector), std::mem_fun_ref(&std::map<int,MyClass>::value_type::second));
std::for_each(Vector.begin(),Vector.end(), std::mem_fun(&MyClass::Method));