P1990 Add operator[] to std::initializer_list
wg21bot opened this issue · 6 comments
P1990R0 Add operator[] to std::initializer_list (Daniil Goncharov, Antony Polukhin)
P1990R0 std::initializer_list::operator[]
Design Review
Chair: Bryce Adelstein Lelbach
Champion: Antony Polukhin
Minute Taker: Ben Craig
Start Review: 2020-02-10 17:04
Add data
to this proposal?
POLL: We should promise more committee time to pursuing P1990R0 (std::initializer_list::operator[]
), knowing that our time is scarce and this will leave less time for other work.
NO OBJECTION TO UNANIMOUS CONSENT.
Attendance: 19
# of Authors: 1
POLL: Forward P1990R0 (std::initializer_list::operator[]
) to LEWG for C++23.
NO OBJECTION TO UNANIMOUS CONSENT.
Attendance: 19
# of Authors: 1
End: 17:18
CONSENSUS: LEWGI sends P1990R0 (std::initializer_list::operator[]
), with the guidance below, to LEWG, for C++23.
- Fix the first example in the comparison table; the left hand side is structurally different from the right (check with Conor Hoekstra for details).
- Check if these changes will make
std::initializer_list
satisfyContiguousView
; if so, consider changing the title of the paper to "Makestd::initialzier_list
satisfyContiguousView
". - Sanity check this with someone knowledgable in EWG(I) to make sure this change doesn't have any language implications.
Botond can you just take a look at this and see if EWGI needs to review it? I'm 85% sure the answer is no.
Titus, despite my comment to Botond, I believe this is ready for LEWG review.
P1990R1 Add operator[] to std::initializer_list (Daniil Goncharov, Antony Polukhin)
Feedback from LEWG(I) Mailing list suggests:
- Note that std::initializer_list is not a general array proxy; it cannot be constructed from an arbitrary (contiguous) range.
The only way to get one is via a braced-init-list. - The difficulty of using an initializer_list as a random access container seems like a feature; it unhelpfully hints at using a std::array, a std::vector, or std::span instead.
Ergo the proposal is currently insufficiently motivated.
Previous discussions:
Re-adding the mailing list tag so this automatically gets triaged if there's a new revision.