[libcxx-commits] [libcxx] [libc++][mdspan] P3383R3: `mdspan.at()` (PR #175213)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 20 21:04:25 PDT 2026
================
@@ -273,6 +306,10 @@ class mdspan {
template <class, class, class, class>
friend class mdspan;
+
+# if _LIBCPP_STD_VER >= 26
+ _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range() const { std::__throw_out_of_range("mdspan"); }
----------------
frederick-vs-ja wrote:
Was it intended not to verify that the result of `what()` contains expected information (which is implementation-defined, though)?
If we want to test the result, I think we can use `LIBCPP_ASSERT(std::string_view(e.what()).contains("mdspan"));`.
https://github.com/llvm/llvm-project/pull/175213
More information about the libcxx-commits
mailing list