mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 12:00:11 -05:00
The COW std::string is not constexpr, so the <stdexcept> exception classes can't be constexpr either when they're defined in terms of the COW string. While constexpr exceptions for <typeinfo>, <new>, and <exception> classes would work, __cpp_constexpr_exceptions >= 202411L implies that everything including <stdexcept> should work. So when we can't support it fully, we shouldn't announce it. libstdc++-v3/ChangeLog: * include/bits/version.def (constexpr_exceptions): Add cxx11abi=yes. * include/bits/version.h: Regenerate. * testsuite/18_support/exception/version.cc: Require effectiove target cxx11_abi. * testsuite/18_support/exception_ptr/exception_ptr_cast.cc: Only check for constexpr support in cxx11 ABI. * testsuite/19_diagnostics/headers/stdexcept/version.cc: Require effective target cxx11_abi. * testsuite/19_diagnostics/logic_error/constexpr.cc: Likewise. * testsuite/19_diagnostics/runtime_error/constexpr.cc: Likewise. * testsuite/20_util/expected/version.cc: Only check for __cpp_lib_constexpr_exceptions macro for cxx11 ABI. * testsuite/20_util/optional/version.cc: Likewise. * testsuite/20_util/variant/version.cc: Likewise. Reviewed-by: Jakub Jelinek <jakub@redhat.com>