cplusplus / nbballot

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

US 50-112 26.5.7.2 [range.utility.conv.to] Omitting parentheses from `ranges::to` #527

Closed wg21bot closed 1 year ago

wg21bot commented 1 year ago

When piping ranges::to, the syntax requires an unfortunate and unnecessary set of empty parentheses:

auto x = lst
  | ranges::to<std::vector>();
auto x = ranges::iota(0, 42)
  | ranges::to<std::vector>();
auto x = get_widgets_map()
  | ranges::to<vector>();

Proposed change:

Adopt a syntax for ranges::to that allows the parentheses to be omitted. This can be achieved with a default constructed tag which dispatches through a function pointer (see discussion in P1206R1 section 11).

inbal2l commented 1 year ago

Scheduled for SG9's meeting in Kona, second session (10:00-11:30): https://wiki.edg.com/bin/view/Wg21kona2022/SG9

inbal2l commented 1 year ago

Reviewed by SG9 at Kona2022 meeting (Full Minutes).

Polls

POLL: Apply the resolution proposed in “US#527: US 50-112 26.5.7.2 (range.utility.conv.to) Allow an omitting parentheses”, Adopt a syntax for ranges::to that allows the parentheses to be omitted (will require a paper).

SF F N A SA
1 8 0 1 0

Attendance: 13 (8 onsite, 5 online)

# of Authors: 0

Author’s position: 1A, 1F

Outcome: Strong consensus in favor

Summary

SG9 supports applying the proposed resolution, changing P1206.

This needs a paper to be forwarded to LEWG. Assuming a paper will be formed, this will be scheduled for LEWG at the Feb2023 meeting.

Waiting for a paper in order to be forwarded to LEWG

brycelelbach commented 1 year ago

2023-02-06 10:30 to 12:00 Issaquah Library Evolution Meeting

US-50-112: Omitting parentheses from ranges::to

2023-02-06 10:30 to 12:00 UTC-8 Issaquah Library Evolution Minutes

Champion: Corentin Jabot (IP)

Chair: Bryce Adelstein Lelbach (IP) & Ben Craig (IP)

Minute Taker: Steve Downey (IP)

Start: 2023-02-06 10:25 UTC-8

Can it be implemented?

Will it be a breaking change if we do it later?

POLL: Reject C++23 National Body comment US-50-112 (Omitting parentheses from ranges::to).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
2 12 9 1 0

Attendance: 22 (in person) + 9 (remote)

# of Authors: 1

Author Position: WF

Outcome: Weak consensus in favor.

N: I'd kinda like to see this, but I don't feel that strongly. If we had a paper, I'd vote in front of it, but we don't have one and have run out of time.

End: 10:43

Next Steps

Reject C++23 National Body comment US-50-112 (Omitting parentheses from ranges::to).

jensmaurer commented 1 year ago

Rejected. There was no consensus for a change.