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