Shaka Player Embedded
|
#include <names.h>
Static Public Member Functions | |
static std::string | name () |
Contains a single method |name| that returns a string for the name of the type. For custom types, it requires a static method |name| to exist on the type T. This contains overrides for built-in types.
The second template parameter should always be void. This is to allow partial specialization for numbers. When instantiating a template, the compiler first gets the default as specified in the base definition. Then it checks each specialization to see if it can infer arguments that will match that specialization.
So when passing (int), it will expand to (int, void), then check each specialization. When it gets to the one for numbers, it will check the enable_if_t; the enable_if_t will result in void if the first type is a number, or an error if not. This will cause that specialization to be used if T is a number and will be ignored if it is not a number.
|
inlinestatic |