template <class Fn>
class binder2nd
: public unary_function<typename Fn::first_argument_type,
typename Fn::result_type> {
protected:
Fn op;
typename Fn::second_argument_type value;
public:
binder2nd(const Fn& x,
const typename Fn::second_argument_type& y);
typename Fn::result_type
operator()(const typename Fn::first_argument_type& x) const;
typename Fn::result_type
operator()(typename Fn::first_argument_type& x) const;
};
The constructor initializes op with x and value with y.
operator() returns op(x,value).