This is the C++17 approved detection mechanism, but changing it in a minor release would potentially be a breaking behavior change, as pre-C++17 compilers are not guaranteed to support __has_include, so this would break GCC and Clang compiling in C++11 and C++14 mode. GCC offers a non-portable solution in #if defined __has_include && __has_include(<cxxabi.h>), but this breaks the entire point. We might be able to do it on multiple lines and just rock it.
detail/demangle.cpp
uses an inaccurate detection mechanism for<cxxabi.h>
:Changeset 2afc956338eba5b8de237701b60dc1cf251a3569 introduced another usage of
<cxxabi.h>
to read the exception type name:This is the C++17 approved detection mechanism, but changing it in a minor release would potentially be a breaking behavior change, as pre-C++17 compilers are not guaranteed to support
__has_include
, so this would break GCC and Clang compiling in C++11 and C++14 mode. GCC offers a non-portable solution in#if defined __has_include && __has_include(<cxxabi.h>)
, but this breaks the entire point. We might be able to do it on multiple lines and just rock it.