Contributions after C++23 mdspan.

Luc Grosheintz luc.grosheintz@gmail.com
Thu Jun 12 05:11:09 GMT 2025


>> After a bit of consideration, I would greatly appreciate if you could look
>> into implementing
>> this one, we are working on stabilizing C++20, and consider having this
>> change as DR for
>> span (so we want implementation that will work in C++20):
>> https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p3029r0.html
>>
> 
> Ah yes, good idea. Since that affects C++20 or would be good to do sooner.
> 

Locally I have two commits that apply the change and test it.

How would you like to merge the changes? Sensible options include:

1. One patch (now) for std::span; then later for std::mdspan
   a. squash into initial commit,
   b. separate commit after the initial commit.

2. One patch for both, after the initial patch for std::mdspan.

>> Afterwards, I agree that working on padded layout makes a lot of sense,
>> even landing them
>> before we will start looking into "optimizing" indexing computation. I
>> would consider updating
>> __linear_index_left to accept the first extent.

I'll start prepping the padded layouts. (Please object if it doesn't fit
your timelines.)

Best wishes,
Luc


More information about the Libstdc++ mailing list