]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Do not check exception at compile-time for mdspan::at for cow string.
authorTomasz Kamiński <tkaminsk@redhat.com>
Tue, 24 Feb 2026 16:54:11 +0000 (17:54 +0100)
committerTomasz Kamiński <tkaminsk@redhat.com>
Tue, 24 Feb 2026 17:03:18 +0000 (18:03 +0100)
Do not test the exception at compile time if _GLIBCXX_USE_CXX11_ABI
is not set, i.e. standard exceptions types are not supported.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/mdspan/at.cc: Updated test.

libstdc++-v3/testsuite/23_containers/mdspan/at.cc

index 4e659f5727547b70e0115dedf9a19d60403bbe5f..d9edce464add55930c524a565b2ada538d1f77bd 100644 (file)
@@ -89,6 +89,12 @@ template<typename Int, bool ValidForPacks, bool ValidForArrays>
       }
     };
 
+#if !_GLIBCXX_USE_CXX11_ABI
+    if consteval {
+      return true;
+    }
+#endif
+
     verify_throw(-1, 0, 0);
     verify_throw(0, -3, 0);
     verify_throw(0, 0, -5);