From 5bf352dfa6a533d54e31f5c006b16fda9294bfae Mon Sep 17 00:00:00 2001 From: neargye Date: Thu, 21 Jul 2022 19:55:02 +0400 Subject: [PATCH] fix #39 --- include/nameof.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/nameof.hpp b/include/nameof.hpp index f5ccf2c..cb47d8d 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -834,7 +834,7 @@ string nameof_type_rtti(const char* tn) { static_assert(nameof_type_rtti_supported::value, "nameof::nameof_type_rtti unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); const auto dmg = abi::__cxa_demangle(tn, nullptr, nullptr, nullptr); const auto name = string{dmg}; - std::free(dmg); + free(dmg); assert(name.size() > 0 && "Type does not have a name."); return name; @@ -845,7 +845,7 @@ string nameof_full_type_rtti(const char* tn) { static_assert(nameof_type_rtti_supported::value, "nameof::nameof_type_rtti unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); const auto dmg = abi::__cxa_demangle(tn, nullptr, nullptr, nullptr); auto name = string{dmg}; - std::free(dmg); + free(dmg); assert(name.size() > 0 && "Type does not have a name."); if constexpr (std::is_const_v>) { name = "const " + name; @@ -868,7 +868,7 @@ string nameof_short_type_rtti(const char* tn) { static_assert(nameof_type_rtti_supported::value, "nameof::nameof_type_rtti unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); const auto dmg = abi::__cxa_demangle(tn, nullptr, nullptr, nullptr); const auto name = string{pretty_name(dmg)}; - std::free(dmg); + free(dmg); assert(name.size() > 0 && "Type does not have a short name."); return name;