ORNL / cpp-proposals-pub

Collaborating on papers for the ISO C++ committee - public repo
26 stars 26 forks source link

P2642: LWG 2024/02/14 review #446

Closed mhoemmen closed 6 months ago

mhoemmen commented 6 months ago

P2642: LWG 2024/02/14 review

[mdspan.layout.leftpadded]

[mdspan.layout.leftpadded.obs]

operator()

[mdspan.layout.rightpadded]

Para 5: Mandates on a type is novel, if arguably better. Normally we say "is ill-formed." But it's not novel because it's what we do for mdspan. However, we only define what it means for Mandates to appear on a function, not on a type. We should fix [structure.specifications] then, not this. (No need to change this proposal.)

Why is static-padding-stride zero in the rank 0 or 1 case? It would be more consistent with the definition for it to be 1. (This is OK; no need to change the proposal.)

[mdspan.layout.rightpadded.cons]

(Converting constructor from layout_right::mapping)

Mandates:
  If OtherExtents::rank() > 1, then
  (static-padding-stride == dynamic_extent)
 || (OtherExtents::static_extents(rank_ - 1) == dynamic_extent) || (static-padding-stride == OtherExtents::static_extents(rank_ - 1)) is true

Finishing with converting constructor from layout_right::mapping, right before converting constructor from layout_stride::mapping.

mhoemmen commented 6 months ago

Preparation for 2024/02/27 LWG review:

crtrott commented 6 months ago

I can still fix the numbers was working on the stuff you hadn't fixed yet this afternoon, but now had noticed you updated more ...

mhoemmen commented 6 months ago

(We chatted offline just now.)

mhoemmen commented 6 months ago

"Paragraph numbers are off at the top of the wording." (This is still the case; it awaits more time for formatting.)

Fixed last night. LWG is pleased on 2024/02/28.

mhoemmen commented 6 months ago

@crtrott Regarding the following point:

Para 2.2, we could drop "and padding_value does not equal dynamic_extent", and use the fact that static-padding-stride is zero along with the definition of LEAST-MULTIPLE-AT-LEAST. (This didn't make sense to me. I'm leaving it for now.)

This didn't sound like a wording correctness issue. We can drop this unless it comes up again.