3 ms·
Nameof Operator for Modern C++
- neargye 8y agoHeader-only C++17 library provides nameof macros and functions to obtain simple name of variable, type, function, macro, and enum. Before, you had to use string literals to refer to definitions, which is brittle when renaming code elements because tools do not know to check these string literals. Try it online: https://wandbox.org/permlink/ffnImjrPVcZR2l5y https://wandbox.org/permlink/ffnImjrPVcZR2l5y