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>
This commit is contained in:
Ahmed Sobhy 2020-10-09 13:10:23 -07:00 committed by GitHub
parent 59323a975a
commit 8d8d48c528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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