Guard cxxabi.h include with __has_include for clang-cl (#6145)
* fix: guard cxxabi.h include with __has_include for clang-cl
clang-cl on Windows defines __GNUG__ but does not ship <cxxabi.h>,
making detail/typeid.h fail to compile. Introduce PYBIND11_HAS_CXXABI_H,
defined only when <cxxabi.h> is actually available (__has_include with
a fallback for compilers without it, including C++11), and use it to
guard both the include and the abi::__cxa_demangle call site.
Fixes #6129
* docs: explain the __has_include fallback for GCC < 5
---------
Co-authored-by: aidaodedjl <jialiang.dong@ju-shen.com>
1 file changed