Class binder1st

Synopsis

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

template <typename Operation>
class binder1st : public unary_function<typename Operation::second_argument_type, typename Operation::result_type>

Description

bind

bind1st

Mentioned in

Inheritance

Ancestors: unary_function

Methods

binder1st
operator() overload

Source

Lines 332-348 in include/EASTL/internal/functional_base.h.

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





Add Discussion as Guest

Log in