diff --git a/example/example.cpp b/example/example.cpp index 54b61d2..8818625 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -66,7 +66,7 @@ class SomeClass { template C SomeMethod6() const { C t{}; - std::cout << NAMEOF_VAR_TYPE(t) << std::endl; + std::cout << NAMEOF_TYPE_EXPR(t) << std::endl; return t; } }; @@ -116,14 +116,16 @@ int main() { // Nameof variable type. std::cout << nameof::nameof_type() << std::endl; // 'SomeStruct' - std::cout << NAMEOF_VAR_TYPE(structvar) << std::endl; // 'SomeStruct' - std::cout << NAMEOF_VAR_TYPE(SomeClass{}) << std::endl; // 'SomeClass' - std::cout << NAMEOF_VAR_TYPE(othervar.ll) << std::endl; // 'Long::LL' + std::cout << NAMEOF_TYPE_EXPR(structvar) << std::endl; // 'SomeStruct' + std::cout << NAMEOF_TYPE_EXPR(othervar.ll) << std::endl; // 'Long::LL' + std::cout << NAMEOF_TYPE_EXPR(std::declval>()) << std::endl; // 'SomeClass' + std::cout << NAMEOF_FULL_TYPE_EXPR(std::declval>()) << std::endl; // 'const SomeClass &&' // Nameof type. std::cout << nameof::nameof_type>() << std::endl; // 'SomeClass' std::cout << NAMEOF_TYPE(SomeClass) << std::endl; // 'SomeClass' std::cout << NAMEOF_TYPE(Long::LL) << std::endl; // 'Long::LL' + std::cout << NAMEOF_FULL_TYPE(const Long::LL&) << std::endl; // 'const Long::LL &' // Nameof macro. std::cout << NAMEOF(__LINE__) << std::endl; // '__LINE__'