https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120914
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tomasz Kaminski <tkami...@gcc.gnu.org>: https://gcc.gnu.org/g:9c600a7e6cc588d2ee79d764cbf69ad677b1bac5 commit r16-2106-g9c600a7e6cc588d2ee79d764cbf69ad677b1bac5 Author: Luc Grosheintz <luc.groshei...@gmail.com> Date: Tue Jul 8 11:49:21 2025 +0200 libstdc++: Better CTAD for span and mdspan [PR120914]. This implements P3029R1. In P3029R1, the CTAD for span is refined to permit deducing the extent of the span from an integral constant, e.g. span((T*) ptr, integral_constant<size_t, 5>{}); is deduced as span<T, 5>. Similarly, in auto exts = extents(integral_constant<int, 2>); auto md = mdspan((T*) ptr, integral_constant<int, 2>); exts and md have types extents<size_t, 2> and mdspan<double, extents<size_t, 2>>, respectively. PR libstdc++/120914 libstdc++-v3/ChangeLog: * include/std/span (span): Update CTAD to enable integral constants [P3029R1]. * include/std/mdspan (extents): ditto. (mdspan): ditto. * testsuite/23_containers/span/deduction.cc: Test deduction guide. * testsuite/23_containers/mdspan/extents/misc.cc: ditto. * testsuite/23_containers/mdspan/mdspan.cc: ditto. Reviewed-by: Jonathan Wakely <jwak...@redhat.com> Reviewed-by: Tomasz KamiÅski <tkami...@redhat.com> Signed-off-by: Luc Grosheintz <luc.groshei...@gmail.com>