libstdc++: questions about P3663

Luc Grosheintz luc.grosheintz@gmail.com
Sun Nov 2 14:11:18 GMT 2025


Thank you! I believe I've addressed almost everything
from your emails in my reply to Mark Hoemmen's email.

On 10/31/25 10:03 PM, Tomasz Kamiński wrote:
> 3) This is repeated often in discussion, but a standard is not a tutorial.
> This is why we do not describe
> what kind of slices are transformed to unit-stride (pairs, tuples), or what
> inputs are considered valid
> slices after canonicalization. The only goal is to describe the
> canonicalization process in a way that
> can be implemented. Such distinction should be part of "how to use
> submdspan" presentations or tutorials.

There's no desire to make it a tutorial. While implementing I had to
scroll up to read exactly what the term "valid slice for the k-th
extent" means, then discover that the term implies canonical, which I
wasn't expecting.

The idea was to align my intuitive understanding of the ideas with
their definition. I think we understand why the intuition differs :)

It sounds like P3663 is phrased with a hierarchy in mind; while I
see three orthogonal ideas: "slices" vs. "slice types", canonical
and valid.

> 
> This is why I am opposed to defining "canonical unit-stride" or "canonical
> valid slice", as non-canonical
> ones are not important from the perspective of layout creators, for which
> this section is intended.

True for `canonical unit-slice` but arguable for "valid canonical
slice", because the precondition for "submdspan" is exactly

   - is a valid (non-canonical) slice for the k-th extent.

It's just not called that, instead the definition of that idea
has been "inlined".


More information about the Libstdc++ mailing list