]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Make the default ctor of mdspan conditionally noexcept.
authorLuc Grosheintz <luc.grosheintz@gmail.com>
Mon, 21 Jul 2025 11:07:37 +0000 (13:07 +0200)
committerTomasz Kamiński <tkaminsk@redhat.com>
Mon, 21 Jul 2025 15:48:02 +0000 (17:48 +0200)
commitdfab6593b05a65b5a475e0572e101bd56e3a2282
treed011bd50860a2e62fd790049cfc07fd8e45792e5
parent03437196942b03eee4f3f3edfaf201f5bdc37d9e
libstdc++: Make the default ctor of mdspan conditionally noexcept.

Previously, the default ctor of mdspan was never noexcept, even if all
members of mdspan were nothrow default constructible.

This commit makes mdspan conditionally nothrow default constructible.
A similar strengthening happens in libc++.

libstdc++-v3/ChangeLog:

* include/std/mdspan (mdspan::mdspan): Make default ctor
conditionally noexcept.
* testsuite/23_containers/mdspan/mdspan.cc: Add tests.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
libstdc++-v3/include/std/mdspan
libstdc++-v3/testsuite/23_containers/mdspan/mdspan.cc