This commit is contained in:
parent
c0486db274
commit
37f2f3da6c
1 changed files with 2 additions and 1 deletions
|
@ -29,7 +29,8 @@ template <typename T> const char* template_nameof_variable(const T& validate_typ
|
||||||
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; }
|
||||||
|
|
||||||
///Used to obtain the string name of a function.
|
///Used to obtain the string name of a function.
|
||||||
#define nameof_function(name) template_nameof_function(#name, sizeof(#name)/sizeof(char) - 1); (name);
|
|
||||||
|
#define nameof_function(name) template_nameof_function(#name); if (false) { (name) };
|
||||||
const char* template_nameof_function(const char* name) { return name; }
|
const char* template_nameof_function(const char* name) { return name; }
|
||||||
|
|
||||||
//example
|
//example
|
||||||
|
|
Loading…
Reference in a new issue