diff --git a/include/nameof.hpp b/include/nameof.hpp index f01e287..1015390 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -208,7 +208,7 @@ template -inline constexpr detail::cstring NameofTypeRaw() noexcept { +inline detail::cstring NameofTypeRaw() noexcept { #if defined(__clang__) return {__PRETTY_FUNCTION__ + (sizeof("detail::cstring nameof::NameofTypeRaw() [T = ") - 1), (sizeof(__PRETTY_FUNCTION__) - 1) - (sizeof("detail::cstring nameof::NameofTypeRaw() [T = ") - 1) - (sizeof("]") - 1)}; @@ -224,7 +224,7 @@ inline constexpr detail::cstring NameofTypeRaw() noexcept { } template ::type> -inline NAMEOF_CONSTEXPR14 detail::cstring NameofType() noexcept { +inline detail::cstring NameofType() noexcept { const auto raw_type_name = NameofTypeRaw(); return detail::NameofBase(raw_type_name.begin(), raw_type_name.length(), false); } diff --git a/test/test.cpp b/test/test.cpp index bc9d2b4..713a4a8 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -113,7 +113,7 @@ TEST_CASE("constexpr") { constexpr auto cx6 = NAMEOF_RAW(__cplusplus); static_assert(cx6 == "__cplusplus", ""); } - +#if 0 SECTION("NAMEOF_TYPE") { SomeClass a; @@ -144,6 +144,7 @@ TEST_CASE("constexpr") { static_assert(cx3 == "SomeClass", ""); #endif } +#endif } #endif