#include <_binary_function.hpp>
Public Types | |
typedef BF::first_argument_type | first_argument_type |
The type of the binary_function's first argument. | |
typedef BF::second_argument_type | second_argument_type |
The type of the binary_function second argument. | |
typedef BF::result_type | result_type |
The type returned when the binary_function is called. | |
Static Public Member Functions | |
static result_type | invoke (const BF &f, first_argument_type a1, second_argument_type a2) |
Invoke the function on given arguments. |
The binary_function is a correspondence between pair of argument values and a result value. I.e. for each pair of argument values it should be possible to invoke the function and obtain the corresponding result value.
Ideally, invocation should have constant time complexity. Although the existing STL algorithms that use this concept are applicable even if the functions have higher complexity, but using them with functions that are not constant time invalidates the complexity guarantee of the algorithm.
This corresponds to SGI STL's concept Adaptable binary_function because we require information about argument type and result type. Thus, all binary functions in Instigate STL are adaptable, including plain C functions.
static result_type instigate::stl::binary_function::interface< BF >::invoke | ( | const BF & | f, | |
first_argument_type | a1, | |||
second_argument_type | a2 | |||
) | [inline, static] |
Invoke the function on given arguments.
f | - the binary function | |
a1 | - the first argument | |
a2 | - the second argument |
Referenced by instigate::stl::binary_function::requirements< T >::helper(), and instigate::stl::invoke().