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: ...@@ -741,7 +741,7 @@ protected:
} catch (error_already_set &e) { } catch (error_already_set &e) {
e.restore(); e.restore();
return nullptr; return nullptr;
#if defined(__GNUG__) && !defined(__clang__) #if defined(__GNUG__) && !defined(_LIBCPP_VERSION)
} catch ( abi::__forced_unwind& ) { } catch ( abi::__forced_unwind& ) {
throw; throw;
#endif #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