<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 12:26 PM Luc Grosheintz <<a href="mailto:luc.grosheintz@gmail.com">luc.grosheintz@gmail.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"><br>
On 7/8/25 11:32, Jonathan Wakely wrote:<br>
> 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>
> <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></blockquote><div>Same for me here: Thank you! This was a really huge amount of work.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div>
I never thought of it that way: spell it out to prevent<br>
typos.<br>
<br>
Thank you for fixing up the mistake when committing the<br>
patches. It's been a nice experience contributing to<br>
libstdc++! Thank you for the patience and thorough &<br>
friendly reviews.<br></div></blockquote><div>Glad to hear that.  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<br>
I'll continue with the C++26 parts: padded layouts, sub-<br>
mdspan, etc.<br></div></blockquote>Sounds good. Alternatively, looking into optimizing layouts before getting </div><div class="gmail_quote gmail_quote_container">submdspan also sounds reasonable. For submdspan we should also look into:<br><a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3663r1.html">https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3663r1.html</a><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<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>
<br>
</div></blockquote></div></div>