Standard C++ Library Reference ISO/IEC (VERSION3)
template<class Result, class Ty, class Arg>
mem_fun1_ref_t<Result, Ty, Arg>
mem_fun_ref(Result (Ty::*pm)(Arg left));
template<class Result, class Ty>
const_mem_fun_ref_t<Result, Ty> mem_fun_ref(Result (Ty::*pm)() const);
template<class Result, class Ty, class Arg>
const_mem_fun1_ref_t<Result, Ty, Arg>
mem_fun_ref(Result (Ty::*pm)(Arg left) const);
};
binary_function
template<class Arg1, class Arg2, class Result>
struct binary_function {
typedef Arg1 first_argument_type;
typedef Arg2 second_argument_type;
typedef Result result_type;
};
The template class serves as a base for classes that define a member function of the form:
result_type operator()(const first_argument_type&,
const second_argument_type&) const
Hence, all such binary functions can refer to their first argument type as first_argument_type, their second
argument type as second_argument_type, and their return type as result_type.
binary_negate
template<class Fn2>
class binary_negate
: public binary_function<
typename Fn2::first_argument_type,
typename Fn2::second_argument_type, bool> {
public:
explicit binary_negate(const Fn2& func);
bool operator()(
const typename Fn2::first_argument_type& left,
const typename Fn2::second_argument_type& right) const;
};
The template class stores a copy of func, which must be a binary function object. It defines its member function
operator() as returning !func(left, right).
bind1st
template<class Fn2, class Ty>
binder1st<Fn2> bind1st(const Fn2amp; func, const Ty& left);
The function returns binder1st<Fn2>(func, typename Fn2::first_argument_type(left)).
bind2nd
template<class Fn2, class Ty>
binder2nd<Fn2> bind2nd(const Fn2& func, const Ty& right);