Adaptable Binary Function
DescriptionAn Adaptable Binary Function is a Binary Function with nested typedefs that define its argument types and result type.   These nested typedefs make it possible to use function object adaptors.
Refinement ofBinary Function
Valid expressionsNone, except for those defined by Binary Function
 Note the implication of this: a function pointer T (*f)(X,Y) is a Binary Function, but not an Adaptable Binary Function: the expressions f::first_argument_type, f::second_argument_type, and f::result_type are nonsensical.
 When you define a class that is a model of Adaptable Binary Function, you must provide these typedefs. The easiest way to do this is to derive the class from the base class binary_function. This is an empty class, with no member functions or member variables; the only reason it exists is to make defining Adaptable Binary Functions more convenient. Binary_function is very similar to the base classes used by the iterator tag functions.
See alsoBinary Function, Adaptable Generator, Adaptable Unary Function
Copyright © 1999 Silicon Graphics, Inc. All Rights Reserved. TrademarkInformation