This commit is contained in:
parent
9e76ea3771
commit
fb05b3394a
1 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
```cpp
|
||||
|
||||
///Used to obtain the string name of a variable.
|
||||
|
||||
#define nameof(name) template_nameof((name), #name)
|
||||
|
@ -10,4 +12,6 @@ const char* template_nameof(T test, const char* name)
|
|||
|
||||
// int test = 0;
|
||||
// std::cout << nameof(test) << std::endl;
|
||||
// prints "test”
|
||||
// prints "test”
|
||||
|
||||
```
|
Loading…
Reference in a new issue