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