Commit 8d8d48c5 by Ahmed Sobhy Committed by GitHub

fix: do not use abi::__forced_unwind with libc++, even with gcc instead of clang (#2569)

* add support for LLVM compiler

* Update include/pybind11/pybind11.h

__forced_unwind libc++ vs libstdc++

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
parent 59323a97
......@@ -741,7 +741,7 @@ protected:
} catch (error_already_set &e) {
e.restore();
return nullptr;
#if defined(__GNUG__) && !defined(__clang__)
#if defined(__GNUG__) && !defined(_LIBCPP_VERSION)
} catch ( abi::__forced_unwind& ) {
throw;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment