Standard C++ Library Reference ISO/IEC (VERSION3)
The function returns binder2nd<Fn2>(func, typename Fn2::second_argument_type(right)).
binder1st
template<class Fn2>
class binder1st
: public unary_function<
typename Fn2::second_argument_type,
typename Fn2::result_type> {
public:
typedef typename Fn2::second_argument_type argument_type;
typedef typename Fn2::result_type result_type;
binder1st(const Fn2& func,
const typename Fn2::first_argument_type& left);
result_type operator()(const argument_type& right) const;
protected:
Fn2 op;
typename Fn2::first_argument_type value;
};
The template class stores a copy of func, which must be a binary function object, in op, and a copy of left in value. It
defines its member function operator() as returning op(value, right).
binder2nd
template<class Fn2>
class binder2nd
: public unary_function<
typename Fn2::first_argument_type,
typename Fn2::result_type> {
public:
typedef typename Fn2::first_argument_type argument_type;
typedef typename Fn2::result_type result_type;
binder2nd(const Fn2& func,
const typename Fn2::second_argument_type& right);
result_type operator()(const argument_type& left) const;
protected:
Fn2 op;
typename Fn2::second_argument_type value;
};
The template class stores a copy of func, which must be a binary function object, in op, and a copy of right in value.
It defines its member function operator() as returning op(left, value).
const_mem_fun_t
template<class Result, class Ty>
struct const_mem_fun_t
: public unary_function<Ty *, Result> {
explicit const_mem_fun_t(Result (Ty::*pm)() const);
Result operator()(const Ty *pleft) const;
};
The template class stores a copy of pm, which must be a pointer to a member function of class Ty, in a private member
object. It defines its member function operator() as returning (pleft->*pm)() const.