cplusplus / nbballot

Handling of NB comments in response to ballots
14 stars 4 forks source link

US 43-104 24.7.3.1p15 [span.overview] subspan type confusion #520

Closed wg21bot closed 1 year ago

wg21bot commented 1 year ago

When std::span was originally proposed, size_type was signed and the second (and default) argument to the subspan() function can be distinguished – based on value – as either requesting a size (non-negative value) or as a special sentinel value (negative value -1) standing for “until the rest of the original span object). However, in a previous feedback resolution, size_type was changed to unsigned type without realizing the implication on semantics change for this function. The specification as it stands now introduces a type confusion.

Proposed change:

Split this function into two overloads: a. Subspan(sizd_type offset) with the meaning of returning a sub-span starting from offset till the end. Subspan(size_type offset, size_type count) with the meaning of retuning a subspan starting from offset and with length count.

brycelelbach commented 1 year ago

This probably needs a paper, but we can try.

FabioFracassi commented 1 year ago

2022-11-09 08:00 to 09:45 UTC-10 Kona Library Evolution Meeting

2022-11-09 08:00 to 09:45 UTC-10 Kona Library Evolution Minutes

Chair: Fabio Fracassi

Summary

Next Steps

brycelelbach commented 1 year ago

2022-11 Library Evolution Electronic Poll Outcomes

Poll 1.10: Reject C++23 National Body comment US-43-104 subspan Type Confusion and any duplicate comments.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
5 7 2 2 1

Outcome: Weak consensus in favor.

jensmaurer commented 1 year ago

There was no consensus for a change.