This commit is contained in:
Terik23 2018-03-17 08:35:15 +05:00 committed by GitHub
parent 6291bc438e
commit 7b1ab54651

View file

@ -60,10 +60,13 @@ int main() {
constexpr auto d = nameof_variable(::someVar); constexpr auto d = nameof_variable(::someVar);
constexpr auto e = nameof_variable(&SomeStruct::SomeMethod); constexpr auto e = nameof_variable(&SomeStruct::SomeMethod);
constexpr auto f = nameof_function(someVar.SomeMethod()); constexpr auto f = nameof_function(someVar.SomeMethod());
constexpr auto g = nameof_type(SomeStruct);
std::cout << a << std::endl; // SomeField std::cout << a << std::endl; // SomeField
std::cout << b << std::endl; // SomeField std::cout << b << std::endl; // SomeField
std::cout << c << std::endl; // someVar std::cout << c << std::endl; // someVar
std::cout << d << std::endl; // someVar std::cout << d << std::endl; // someVar
std::cout << e << std::endl; // SomeMethod std::cout << e << std::endl; // SomeMethod
std::cout << f << std::endl; // SomeMethod() std::cout << f << std::endl; // SomeMethod()
std::cout << g << std::endl; // SomeStruct
} }