Share via


mem_fun1_t

mem_fun1_t

template<class R, class T, class A>
    struct mem_fun1_t : public binary_function<T *, A, R> {
    explicit mem_fun1_t(R (T::*pm)(A));
    R operator()(T *p, A arg);
    };

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)(arg).