Only P3068R6 (Allowing exception throwing in constant-evaluation) is
implemented in the library so far, so the value of the
constexpr_exceptions feature test macro should be 202411L. Once we
support the library changes in P3378R2 (constexpr exception types) then
we can set the value to 202502L again.
libstdc++-v3/ChangeLog:
PR libstdc++/117785
* include/bits/version.def (constexpr_exceptions): Define
correct value.
* include/bits/version.h: Regenerate.
* libsupc++/exception: Check correct value.
* testsuite/18_support/exception/version.cc: New test.
ftms = {
name = constexpr_exceptions;
values = {
- v = 202502;
+ v = 202411;
cxxmin = 26;
extra_cond = "__cpp_constexpr_exceptions >= 202411L";
};
#if !defined(__cpp_lib_constexpr_exceptions)
# if (__cplusplus > 202302L) && (__cpp_constexpr_exceptions >= 202411L)
-# define __glibcxx_constexpr_exceptions 202502L
+# define __glibcxx_constexpr_exceptions 202411L
# if defined(__glibcxx_want_all) || defined(__glibcxx_want_constexpr_exceptions)
-# define __cpp_lib_constexpr_exceptions 202502L
+# define __cpp_lib_constexpr_exceptions 202411L
# endif
# endif
#endif /* !defined(__cpp_lib_constexpr_exceptions) && defined(__glibcxx_want_constexpr_exceptions) */
#include <bits/exception.h>
#define __glibcxx_want_uncaught_exceptions
+#define __glibcxx_want_constexpr_exceptions
#define __glibcxx_want_exception_ptr_cast
#include <bits/version.h>
--- /dev/null
+// { dg-do preprocess { target c++26 } }
+// { dg-add-options no_pch }
+
+#include <exception>
+
+#ifndef __cpp_lib_constexpr_exceptions
+# error "Feature test macro for constexpr_exceptions is missing in <exception>"
+#elif __cpp_lib_constexpr_exceptions < 202411L
+# error "Feature test macro for constexpr_exceptions has wrong value in <exception>"
+#endif