A system for printing the name of types. More...
Functions | |
template<typename T > | |
constexpr const char * | sp::getTypeName () |
Get a type-encoded string representing the given type. More... | |
Variables | |
template<typename T > | |
constexpr const char * | sp::type_name_v = getTypeName<T>() |
Memoized result of getTypeName() More... | |
A system for printing the name of types.
This is quite useful for making nice errors in template code, because you can print out the names of types used as template parameters.
Specialise TypeName<T>
for your new type to add support for user-defined types.
|
constexpr |
Get a type-encoded string representing the given type.
|
constexpr |
Memoized result of getTypeName()