Commit d91d088
aidaodedjl
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 #61291 parent 0599909 commit d91d088
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
| |||
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | | - | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
0 commit comments