[libc++] Fix ODR violation with __exception_guard in mixed exceptions builds

This fix was proposed in https://reviews.llvm.org/D133661#4095018
This commit is contained in:
Alexander Kornienko 2023-02-01 13:23:04 +01:00
parent 95668c0d97
commit 561105fb9d

View File

@ -89,7 +89,7 @@ private:
};
#else // _LIBCPP_NO_EXCEPTIONS
template <class _Rollback>
struct __exception_guard {
struct [[gnu::abi_tag("-fno-exceptions")]] __exception_guard {
__exception_guard() = delete;
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG explicit __exception_guard(_Rollback) {}