Class binder2nd

Synopsis

#include <include/EASTL/internal/functional_base.h>

template <typename Operation>
class binder2nd : public unary_function<typename Operation::first_argument_type, typename Operation::result_type>

Description

bind2nd

Mentioned in

Inheritance

Ancestors: unary_function

Methods

binder2nd
operator() overload

Source

Lines 361-377 in include/EASTL/internal/functional_base.h.

template <typename Operation>
class binder2nd : public unary_function<typename Operation::first_argument_type, typename Operation::result_type>
{
    protected:
        Operation op;
        typename Operation::second_argument_type value;
    public:
        binder2nd(const Operation& x, const typename Operation::second_argument_type& y)
            : op(x), value(y) { }
        typename Operation::result_type operator()(const typename Operation::first_argument_type& x) const
            { return op(x, value); }
        typename Operation::result_type operator()(typename Operation::first_argument_type& x) const
            { return op(x, value); }
};





Add Discussion as Guest

Log in