I think we want something like this:

--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -297,10 +297,13 @@ namespace std _GLIBCXX_VISIBILITY(default)
  /// Obtain an exception_ptr pointing to a copy of the supplied object.
#if (__cplusplus >= 201103L && __cpp_rtti) || __cpp_exceptions
  template<typename _Ex>
-    _GLIBCXX26_CONSTEXPR exception_ptr
+#if defined __cpp_exceptions && defined __cpp_constexpr_exceptions
+    constexpr
+#endif
+    exception_ptr
    make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT
    {
-#if __cplusplus >= 202400L
+#if defined __cpp_exceptions && defined __cpp_constexpr_exceptions
      if consteval {
       try
         {

Otherwise I see this when testing with GLIBCXX_TESTSUITE_STDS=26

FAIL: 17_intro/headers/c++1998/all_no_exceptions.cc  -std=gnu++26
(test for excess errors)

The test just tries to include all headers using -fno-exceptions

Reply via email to