<div dir="auto"><div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, 18 May 2026, 08:27 Tomasz Kaminski, <<a href="mailto:tkaminsk@redhat.com">tkaminsk@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 17, 2026 at 9:29 PM Jonathan Wakely <<a href="mailto:jwakely@redhat.com" target="_blank" rel="noreferrer">jwakely@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is specified as const in the standard.<br>
<br>
libstdc++-v3/ChangeLog:<br>
<br>
* include/std/mdspan (mdspan::is_exhaustive): Add const keyword.<br>
* testsuite/23_containers/mdspan/mdspan.cc: Check that<br>
is_unique, is_exhaustive, and is_strided can be called on a<br>
const object.<br>
---<br>
<br>
Tested x86_64-linux.<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
libstdc++-v3/include/std/mdspan | 2 +-<br>
libstdc++-v3/testsuite/23_containers/mdspan/mdspan.cc | 2 +-<br>
2 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan<br>
index 5938bf09a940..27d15df12944 100644<br>
--- a/libstdc++-v3/include/std/mdspan<br>
+++ b/libstdc++-v3/include/std/mdspan<br>
@@ -2621,7 +2621,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION<br>
{ return _PaddedStorage::_M_is_always_exhaustive(); }<br>
<br>
constexpr bool<br>
- is_exhaustive() noexcept<br>
+ is_exhaustive() const noexcept<br>
{ return _M_storage._M_is_exhaustive(); }<br></blockquote><div>This is not mdspan, but `layout_left_padded`, and the problem seems to be</div><div>repeated in more mappings, and we should fix all of them. Do you want me</div><div>to create a follow-up patch with that? I would also backport it to 16.</div></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Oops! Yes, we should fix it everywhere in both branches. </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
static constexpr bool<br>
diff --git a/libstdc++-v3/testsuite/23_containers/mdspan/mdspan.cc b/libstdc++-v3/testsuite/23_containers/mdspan/mdspan.cc<br>
index 62ff7201cce9..99205142579a 100644<br>
--- a/libstdc++-v3/testsuite/23_containers/mdspan/mdspan.cc<br>
+++ b/libstdc++-v3/testsuite/23_containers/mdspan/mdspan.cc<br>
@@ -715,7 +715,7 @@ template<typename Layout, bool Expected><br>
test_nothrow_is_methods()<br>
{<br>
using Extents = std::extents<int, dyn>;<br>
- using MDSpan = std::mdspan<double, Extents, Layout>;<br>
+ using MDSpan = const std::mdspan<double, Extents, Layout>;<br>
static_assert(noexcept(MDSpan::is_always_unique()) == Expected);<br>
static_assert(noexcept(MDSpan::is_always_exhaustive()) == Expected);<br>
static_assert(noexcept(MDSpan::is_always_strided()) == Expected);<br>
-- <br>
2.54.0<br>
<br>
</blockquote></div></div>
</div>
</blockquote></div></div></div>