#include <function-adapter.h>
Collaboration diagram for unary_fct_ref:
Public Types | |
typedef F::argument_type | argument_type |
typedef F::result_type | result_type |
Public Methods | |
unary_fct_ref () | |
unary_fct_ref (const F &ff) | |
result_type | operator() (const argument_type &x) const |
Model of Adaptable Unary Function.
Function objects are often passed by value in STL algorithms, e.g. in unary_compose<F1,F2>. This is not wanted in the case of 'heavy' function objects, thus, a references wrapper is passed by value.
Example:
bijective_mapping<int, int> f; // fill f ... int v[100]; iota(v,v+100,0); // v = {0,1, ..., 99} int w[100]; copy_filter(v,v+100, w, make_unary_fct_ref(f));
Definition at line 45 of file function-adapter.h.
|
Definition at line 49 of file function-adapter.h. Referenced by operator(). |
|
Definition at line 50 of file function-adapter.h. Referenced by operator(). |
|
Definition at line 52 of file function-adapter.h. |
|
Definition at line 53 of file function-adapter.h. |
|
Definition at line 55 of file function-adapter.h. References argument_type, and result_type. |