diff --git a/libstdc++-v3/libsupc++/eh_ptr.cc b/libstdc++-v3/libsupc++/eh_ptr.cc index 5d8ac1d879a..80999f52795 100644 --- a/libstdc++-v3/libsupc++/eh_ptr.cc +++ b/libstdc++-v3/libsupc++/eh_ptr.cc @@ -72,9 +72,12 @@ std::__exception_ptr::exception_ptr::exception_ptr(void* obj) noexcept : _M_exception_object(obj) { _M_addref(); } +#ifdef _GLIBCXX_EH_PTR_COMPAT + std::__exception_ptr::exception_ptr::exception_ptr(__safe_bool) noexcept : _M_exception_object(nullptr) { } +#endif void std::__exception_ptr::exception_ptr::_M_addref() noexcept @@ -112,6 +115,7 @@ std::__exception_ptr::exception_ptr::_M_get() const noexcept { return _M_exception_object; } +#ifdef _GLIBCXX_EH_PTR_COMPAT // Retained for compatibility with CXXABI_1.3. void @@ -130,6 +134,8 @@ std::__exception_ptr::exception_ptr::operator __safe_bool() const noexcept return _M_exception_object ? &exception_ptr::_M_safe_bool_dummy : nullptr; } +#endif + const std::type_info* std::__exception_ptr::exception_ptr::__cxa_exception_type() const noexcept {