From 8d8d48c5281438e6fb400984ff8c1522d2b9fb28 Mon Sep 17 00:00:00 2001 From: Ahmed Sobhy <68698147+asobhy-qnx@users.noreply.github.com> Date: Fri, 9 Oct 2020 13:10:23 -0700 Subject: [PATCH] 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 Co-authored-by: Henry Schreiner --- include/pybind11/pybind11.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 7cf88e8f5..4ecdd1602 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -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