mem_fun_t
mem_fun_t
template<class R, class T>
struct mem_fun_t : public unary_function<T *, R> {
explicit mem_fun_t(R (T::*pm)());
R operator()(T *p);
};
The template class stores a copy of pm
, which must be a pointer to a member function of class T
, in a private member object. It defines its member function operator()
as returning (p->*pm)()
.