Classes | |
class | std::pointer_to_unary_function< Arg, Result > |
One of the adaptors for function pointers. More... | |
class | std::pointer_to_binary_function< Arg1, Arg2, Result > |
One of the adaptors for function pointers. More... | |
Functions | |
template<class Arg, class Result> | |
pointer_to_unary_function< Arg, Result > | std::ptr_fun (Result(*x)(Arg)) |
One of the adaptors for function pointers. | |
template<class Arg1, class Arg2, class Result> | |
pointer_to_binary_function< Arg1, Arg2, Result > | std::ptr_fun (Result(*x)(Arg1, Arg2)) |
One of the adaptors for function pointers. |
result_type
from the base classes unary_function
and binary_function
). Sometimes those typedefs are required, not just optional.
Adaptors are provided to turn pointers to unary (single-argument) and binary (double-argument) functions into function objects. The long-winded functor pointer_to_unary_function
is constructed with a function pointer f
, and its operator()
called with argument x
returns f(x)
. The functor pointer_to_binary_function
does the same thing, but with a double-argument f
and operator()
.
The function ptr_fun
takes a pointer-to-function f
and constructs an instance of the appropriate functor.
|
One of the adaptors for function pointers.
Definition at line 525 of file stl_function.h. |
|
One of the adaptors for function pointers.
Definition at line 500 of file stl_function.h. |