От: | IROV.. | ||
Дата: | 21.10.05 14:27 | ||
Оценка: |
template<class T_Function >
class FMapSecondBinder
: public T_Function
{
public:
template<class T_Pair>
void operator()( const T_Pair &Value )const
{
T_Function::operator()(Value.second);
}
};
template<class T_Function >
const FMapSecondBinder<T_Function> & second_binder(const T_Function &Function)
{
return *(const FMapSecondBinder<T_Function>*)(&Function);
}
std::for_each(Map.begin(),Map.end(),second_binder(MyFunctor()));