|Category: functors ||Component type: concept |
An Adaptable Unary Function is a UnaryFunction with nested
typedefs that define its argument type and result type.   These nested
typedef make it possible to use function object adaptors.
|Argument type |
|The type of |
|Result type |
|The type returned when the Unary Function is called |
|A type that is a model of Unary Function |
None, except for those defined by UnaryFunction
 Note the implication of this: a function pointer
T (*f)(X) is a UnaryFunction, but not an Adaptable Unary Function: the expressions
f::result_type are nonsensical.
 When you define a class that is a model of Adaptable Unary Function, you must provide these
typedefs. The easiest way to do this is to derive the class from the base class
unary_function. This is an empty class, with no member functions or member variables; the only reason it exists is to make defining Adaptable Unary Functions more convenient.
unary_function is very similar to the base classes used by the iterator_tags functions.
UnaryFunction, AdaptableGenerator, AdaptableBinaryFunction