Files
Jonathan Wakely 278eb0a081 libstdc++: Make __cpp_lib_constexpr_exceptions depend on cxx11 ABI
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>
2025-12-17 21:28:57 +00:00
..