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.
---
Tested on x86_64-linux. Pushed to trunk.
libstdc++-v3/testsuite/23_containers/mdspan/at.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libstdc++-v3/testsuite/23_containers/mdspan/at.cc
b/libstdc++-v3/testsuite/23_containers/mdspan/at.cc
index 4e659f57275..d9edce464ad 100644
--- a/libstdc++-v3/testsuite/23_containers/mdspan/at.cc
+++ b/libstdc++-v3/testsuite/23_containers/mdspan/at.cc
@@ -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);
--
2.53.0