This commit is contained in:
Terik23 2018-03-17 08:12:08 +05:00 committed by GitHub
parent c0486db274
commit 37f2f3da6c

View file

@ -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; }
///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; }
//example