On Mon, Jul 7, 2025 at 11:41 AM Luc Grosheintz <luc.groshei...@gmail.com>
wrote:

> libstdc++-v3/ChangeLog:
>
>         * include/bits/version.def (mdspan): Set to 202207 and remove
>         no_stdname.
>         * include/bits/version.h: Regenerate.
>         * testsuite/23_containers/mdspan/mdspan_ftm.cc: Test presence
>         of FTM.
>
> Signed-off-by: Luc Grosheintz <luc.groshei...@gmail.com>
> ---
>
Some minor suggestions below. Could you please also mention PR107761 in the
commit.
We have automation that will put that in bugzilla, so people tracking
issues can see it.
I would do that in general for any new commits implementing language
feature.
Let me know if you will not be able to find a corresponding bugzilla ticket.

>  libstdc++-v3/include/bits/version.def                     | 3 +--
>  libstdc++-v3/include/bits/version.h                       | 3 ++-
>  libstdc++-v3/testsuite/23_containers/mdspan/mdspan_ftm.cc | 6 ++++++
>  3 files changed, 9 insertions(+), 3 deletions(-)
>  create mode 100644
> libstdc++-v3/testsuite/23_containers/mdspan/mdspan_ftm.cc
>
> diff --git a/libstdc++-v3/include/bits/version.def
> b/libstdc++-v3/include/bits/version.def
> index f4ba501c403..ad909afd20e 100644
> --- a/libstdc++-v3/include/bits/version.def
> +++ b/libstdc++-v3/include/bits/version.def
> @@ -1007,9 +1007,8 @@ ftms = {
>
>  ftms = {
>    name = mdspan;
> -  no_stdname = true; // FIXME: remove
>    values = {
> -    v = 1; // FIXME: 202207
> +    v = 202207;
>      cxxmin = 23;
>    };
>  };
> diff --git a/libstdc++-v3/include/bits/version.h
> b/libstdc++-v3/include/bits/version.h
> index dc8ac07be16..72f9231846e 100644
> --- a/libstdc++-v3/include/bits/version.h
> +++ b/libstdc++-v3/include/bits/version.h
> @@ -1126,8 +1126,9 @@
>
>  #if !defined(__cpp_lib_mdspan)
>  # if (__cplusplus >= 202100L)
> -#  define __glibcxx_mdspan 1L
> +#  define __glibcxx_mdspan 202207L
>  #  if defined(__glibcxx_want_all) || defined(__glibcxx_want_mdspan)
> +#   define __cpp_lib_mdspan 202207L
>  #  endif
>  # endif
>  #endif /* !defined(__cpp_lib_mdspan) && defined(__glibcxx_want_mdspan) */
> diff --git a/libstdc++-v3/testsuite/23_containers/mdspan/mdspan_ftm.cc
> b/libstdc++-v3/testsuite/23_containers/mdspan/mdspan_ftm.cc
> new file mode 100644
> index 00000000000..fc528293e66
> --- /dev/null
> +++ b/libstdc++-v3/testsuite/23_containers/mdspan/mdspan_ftm.cc
>
I would name the file just ftm.

> @@ -0,0 +1,6 @@
> +// { dg-do compile { target c++23 } }
> +#include <mdspan>
> +
> +#ifndef __cpp_lib_mdspan
> +#error "Missing FTM"
> +#endif
>
We usually use following to test the feature test macro:
#ifndef __cpp_lib_ranges_to_container
# error "Feature test macro for ranges_to_container is missing in <ranges>"
#elif __cpp_lib_ranges_to_container < 202202L
# error "Feature test macro for ranges_to_container has wrong value in
<ranges>"
#endif


> --
> 2.49.0
>
>

Reply via email to