...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Boost.FunctionTypes provides functionality to classify, decompose and synthesize function, function pointer, function reference and pointer to member types.
We collectively refer to these types as callable builtin types.
In particular, the library can be used to:
The library is designed to work well with other Boost libraries and uses well-accepted concepts introduced by Boost and TR1.
Templates that encapsulate boolean or numeric properties define a static member
constant called value
.
is_function_pointer< bool(*)(int) >::value // == true function_arity< bool(*)(int) >::value // == 1
Templates that encapsulate properties that are single types contain a type
member called type
.
function_type< mpl::vector<bool,int> >::type // is bool(int) result_type< bool(&)(int) >::type // is bool
Templates that encapsulate properties that are type lists model an MPL-compatible type sequence.
parameter_types< bool(int) > // models an MPL sequence