<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Jul 8, 2025 at 11:34 AM Jonathan Wakely <<a href="mailto:jwakely@redhat.com">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">On Tue, 8 Jul 2025 at 09:27, Luc Grosheintz <<a href="mailto:luc.grosheintz@gmail.com" target="_blank">luc.grosheintz@gmail.com</a>> wrote:<br>
><br>
> PR libstdc++/107761<br>
><br>
> libstdc++-v3/ChangeLog:<br>
><br>
> * include/bits/version.def (mdspan): Set to 202207 and remove<br>
> no_stdname.<br>
> * include/bits/version.h: Regenerate.<br>
> * testsuite/23_containers/mdspan/ftm.cc: Test presence<br>
> of FTM.<br>
<br>
Please spell this out in full as "feature test macro", there's no need<br>
to use an initialism that some people won't recognise. (And the commit<br>
summary line says "FMT" not "FTM" anyway ;-)<br></blockquote><div>I am also renaming the test file for ftm.cc to version.cc. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I would also prefer the test to be called version.cc not ftm.cc as<br>
that's what we use elsewhere.<br>
<br>
I think we can do that when pushing the commit though, we don't need<br>
another patch for it.<br>
<br>
Thanks for getting <mdspan> done! Great work.<br>
<br>
><br>
> Signed-off-by: Luc Grosheintz <<a href="mailto:luc.grosheintz@gmail.com" target="_blank">luc.grosheintz@gmail.com</a>><br>
> ---<br>
> libstdc++-v3/include/bits/version.def | 3 +--<br>
> libstdc++-v3/include/bits/version.h | 3 ++-<br>
> libstdc++-v3/testsuite/23_containers/mdspan/ftm.cc | 9 +++++++++<br>
> 3 files changed, 12 insertions(+), 3 deletions(-)<br>
> create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/ftm.cc<br>
><br>
> diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def<br>
> index 64f8190d240..f1015abdbfa 100644<br>
> --- a/libstdc++-v3/include/bits/version.def<br>
> +++ b/libstdc++-v3/include/bits/version.def<br>
> @@ -1007,9 +1007,8 @@ ftms = {<br>
><br>
> ftms = {<br>
> name = mdspan;<br>
> - no_stdname = true; // FIXME: remove<br>
> values = {<br>
> - v = 1; // FIXME: 202207<br>
> + v = 202207;<br>
> cxxmin = 23;<br>
> };<br>
> };<br>
> diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h<br>
> index 744246a9938..80f6586372d 100644<br>
> --- a/libstdc++-v3/include/bits/version.h<br>
> +++ b/libstdc++-v3/include/bits/version.h<br>
> @@ -1126,8 +1126,9 @@<br>
><br>
> #if !defined(__cpp_lib_mdspan)<br>
> # if (__cplusplus >= 202100L)<br>
> -# define __glibcxx_mdspan 1L<br>
> +# define __glibcxx_mdspan 202207L<br>
> # if defined(__glibcxx_want_all) || defined(__glibcxx_want_mdspan)<br>
> +# define __cpp_lib_mdspan 202207L<br>
> # endif<br>
> # endif<br>
> #endif /* !defined(__cpp_lib_mdspan) && defined(__glibcxx_want_mdspan) */<br>
> diff --git a/libstdc++-v3/testsuite/23_containers/mdspan/ftm.cc b/libstdc++-v3/testsuite/23_containers/mdspan/ftm.cc<br>
> new file mode 100644<br>
> index 00000000000..106ee4010ee<br>
> --- /dev/null<br>
> +++ b/libstdc++-v3/testsuite/23_containers/mdspan/ftm.cc<br>
> @@ -0,0 +1,9 @@<br>
> +// { dg-do compile { target c++23 } }<br>
> +#include <mdspan><br>
> +<br>
> +#ifndef __cpp_lib_mdspan<br>
> +#error "Feature test macro __cpp_lib_mdspan is missing for <mdspan>"<br>
> +#if __cpp_lib_mdspan < 202207<br>
> +#error "Feature test macro __cpp_lib_mdspan has the wrong value"<br>
> +#endif<br>
> +#endif<br>
> --<br>
> 2.49.0<br>
><br>
<br>
</blockquote></div></div>