[PATCH v1] libstdc++: Set FMT for complete C++23 mdspan.
Tomasz Kaminski
tkaminsk@redhat.com
Mon Jul 7 12:43:33 GMT 2025
On Mon, Jul 7, 2025 at 2:11 PM Luc Grosheintz <luc.grosheintz@gmail.com>
wrote:
>
> On 7/7/25 13:30, Tomasz Kaminski wrote:
> > Ah, I just missed the other e-mail, and just found it.
> > Yes, in that case it makes sense to include it in the patch series.
> > You may also update the last two commits.
>
> I'm not quite sure what you mean by "update the last two commits".
>
> Do you mean that I should update mdspan [v3 4/5] and [v3 5/5] but
> leave the first three commits alone?
>
The v3 1-4 were already approved, and I have made requested changes locally.
So I would just submit the new patch v4 5/5 and feature test macro.
>
> I would have just updated all commits according to the suggestions
> you made.
>
This I think would suggest that re-approval is needed, just multiplying the
work needed.
>
> >
> > On Mon, Jul 7, 2025 at 1:27 PM Luc Grosheintz <luc.grosheintz@gmail.com>
> > wrote:
> >
> >>
> >>
> >> On 7/7/25 13:24, Tomasz Kaminski wrote:
> >>> On Mon, Jul 7, 2025 at 12:34 PM Luc Grosheintz <
> luc.grosheintz@gmail.com
> >>>
> >>> wrote:
> >>>
> >>>>
> >>>>
> >>>> On 7/7/25 11:45, Tomasz Kaminski wrote:
> >>>>> On Mon, Jul 7, 2025 at 11:41 AM Luc Grosheintz <
> >> luc.grosheintz@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.grosheintz@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.
> >>>>
> >>>> Makes sense, and I've been horribly inconsistent about this (I
> >> completely
> >>>> forgot during all of the layout patches).
> >>>>
> >>>> I'll add the updated commit to v4 of the mdspan patch series.
> >>>>
> >>> I will be merging patch series for mdspan with changes made locally.
> >>> Please just send v2 of this patch.
> >>
> >> Even though there's a major complaint related to ADL issues in
> >> swap?
> >>
> >> https://gcc.gnu.org/pipermail/libstdc++/2025-July/062380.html
> >>
> >>>
> >>>>
> >>>>>
> >>>>>> 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
> >>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>
> >>
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20250707/2555bc73/attachment-0001.htm>
More information about the Libstdc++
mailing list