From dfc4677bd76d235149c7f69921d78ccad4ada6dd Mon Sep 17 00:00:00 2001 From: Terik23 Date: Sat, 17 Mar 2018 08:16:28 +0500 Subject: [PATCH] --- nameof.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nameof.cpp b/nameof.cpp index b0550d1..6703eb3 100644 --- a/nameof.cpp +++ b/nameof.cpp @@ -21,16 +21,16 @@ //SOFTWARE. ///Used to obtain the string name of a variable. -#define nameof_variable(name) template_nameof_variable(name, #name) +#define nameof_variable(variable) template_nameof_variable(variable, #variable) template constexpr 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) +#define nameof_type(typ) template_nameof_type(#typ) template constexpr 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); if (false) { (name) }; +#define nameof_function(function) template_nameof_function(#function); if (false) (void)(function); constexpr const char* template_nameof_function(const char* name) { return name; } //example