Provides traits of a Callable type: return type, parameter types, and a number of parameters. More...
#include <chsvmetafun.h>
Provides traits of a Callable type: return type, parameter types, and a number of parameters.
Callable | is a type of any Callable object except for variadic functions with va_list parameters. |
The following compile-time fields are defined.
return_type
is a return type of the callable.number_of_parameters
is an std::size_t
value specifying a number of parameters expected by the callable, not counting the first this pointers for class member functions.parameter_type
is a templated type alias of a parameter of the callable. The alias accepts a zero-based index, of the std::size_t
type, of the parameter and yields its type. Likewise, this does not include the hidden this pointers of class member functions.The type is SFINAE friendly is a sense that all these members will be defined for Callable objects only.