Adaptable Unary Function
unary_function<AdaptableBinaryFunction::first_argument_type, AdaptableBinaryFunction::result_type>
Member | Where defined | Description |
---|---|---|
argument_type | Adaptable Unary Function | The type of the function object's argument, which is |
result_type | Adaptable Unary Function | The type of the result: |
result_type operator()(const argument_type& x) const | Adaptable Unary Function | Function call. Returns |
binder2nd(const AdaptableBinaryFunction& F, AdaptableBinaryFunction::second_argument_type c) | binder2nd | See below |
template <class AdaptableBinaryFunction, class T> binder2nd<AdaptableBinaryFunction> bind2nd(const AdaptableBinaryFunction& F, const T& c); | binder2nd | See below |
These members are not defined in the Adaptable Unary Function requirements, but are specific to
Member | Description |
---|---|
binder2nd(const AdaptableBinaryFunction& F, AdaptableBinaryFunction::second_argument_type c) | The constructor. Creates a |
template <class AdaptableBinaryFunction, class T> binder2nd<AdaptableBinaryFunction> bind2nd(const AdaptableBinaryFunction& F, const T& c); | If |
[1] Intuitively, you can think of this operation as 'binding' the second argument of a binary function to a constant, thus yielding a unary function. This is a special case of a closure.
The function object overview,
ptr_fun
Categories: functors, adaptors
Component type: function
template <class Arg, class Result>
pointer_to_unary_function<Arg, Result> ptr_fun(Result (*x)(Arg));
template <class Arg1, class Arg2, class Result>
pointer_to_binary_function<Arg1, Arg2, Result> ptr_fun(Result (*x)(Arg1, Arg2));