Skip to content

Commit 75e2c60

Browse files
committed
fix: Misbehaving preprocessor directive in absence of <cxxabi.h>
1 parent 854d8c8 commit 75e2c60

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Foundation/include/Poco/Types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ using UIntPtr = std::uintptr_t;
8585
inline std::string Foundation_API demangle(const char* typeName)
8686
{
8787
std::string result(typeName);
88+
#if __has_include(<cxxabi.h>)
8889
#ifdef POCO_HAVE_CXXABI_H
8990
int status;
9091
char* demangled = abi::__cxa_demangle(typeName, nullptr, nullptr, &status);
@@ -104,6 +105,7 @@ inline std::string Foundation_API demangle(const char* typeName)
104105

105106
std::free(demangled);
106107
}
108+
#endif
107109
#endif
108110
return result;
109111
}

0 commit comments

Comments
 (0)