This commit is contained in:
Terik23 2016-10-09 20:35:11 +05:00 committed by GitHub
parent dd1bf76e65
commit 3192011520

View file

@ -1,19 +1,10 @@
///Used to obtain the string name of a variable.
#define nameof_variable(name) template_nameof_variable(name, #name)
template <typename T> const char* template_nameof_variable(const T& validate_type, const char* name) { return name; }
template <typename T>
const char* template_nameof_variable(const T& validate_type, const char* name)
{
return name;
}
///Used to obtain the string name of a type.
#define nameof_type(name) template_nameof_type<name>(#name)
template <typename T>
const char* template_nameof_type(const char* name)
{
return name;
}
template <typename T> const char* template_nameof_type(const char* name) { return name; }
//example
int test = 0;