Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P1206 ranges::to: A function to convert any range to a container #145

Closed
jensmaurer opened this issue Jan 26, 2019 · 18 comments · Fixed by cplusplus/draft#5280
Closed

P1206 ranges::to: A function to convert any range to a container #145

jensmaurer opened this issue Jan 26, 2019 · 18 comments · Fixed by cplusplus/draft#5280
Labels
C++23 Targeted at C++23 IS Ship vehicle: IS LWG Library plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. ranges std::ranges
Milestone

Comments

@jensmaurer
Copy link
Member

P1206R1 ranges::to: A function to convert any range to a container (Corentin Jabot, Eric Niebler, Casey Carter)

@jensmaurer jensmaurer added this to the 2019-02 milestone Jan 26, 2019
@jensmaurer jensmaurer added LEWG Library Evolution ranges std::ranges labels Jan 26, 2019
@jensmaurer jensmaurer added this to Wednesday in LEWG in Kona 2019 Feb 6, 2019
@tituswinters
Copy link

tituswinters commented Feb 21, 2019

LEWG in Kona:
Pursue this for C++20.
SF F N A SA
0 4 5 4 3

(Concerns about convertible-to associative containers, expressing things in terms of CTAD.)

@tituswinters tituswinters removed the LEWG Library Evolution label Feb 21, 2019
@tituswinters
Copy link

tituswinters commented Feb 22, 2019

LEWG in Kona:
OK with auto j = my_range | ranges::tostd::vector;
(The invocation without ()s).
SF F N A SA
9 6 6 3 0

Add wording with Eric & Casey, send to LWG for C++20.
SF F N A SA
10 10 2 0 0

@tituswinters tituswinters added the LWG Library label Feb 22, 2019
@jensmaurer jensmaurer removed this from the 2019-02 milestone Mar 21, 2019
@mclow
Copy link

mclow commented Jun 7, 2019

Note: p1206r1 has no proposed wording.

We do not provide wording at this time, but this is what the interface would look like conceptually.

@jensmaurer jensmaurer added the needs-revision Paper needs changes before it can proceed label Jul 1, 2019
denesb added a commit to denesb/scylla that referenced this issue May 29, 2020
Sadly, std::ranges is missing an equivalent of boost::copy_range(), so
we introduce a replacement: ranges::to(). There is an existing proposal
to introduce something similar to the standard library:
std::ranges::to() (cplusplus/papers#145). We
name our own version similarly, so if said proposal makes it in we can
just prepend std:: and be good.
avikivity pushed a commit to scylladb/scylladb that referenced this issue May 31, 2020
Sadly, std::ranges is missing an equivalent of boost::copy_range(), so
we introduce a replacement: ranges::to(). There is an existing proposal
to introduce something similar to the standard library:
std::ranges::to() (cplusplus/papers#145). We
name our own version similarly, so if said proposal makes it in we can
just prepend std:: and be good.

Signed-off-by: Botond Dénes <bdenes@scylladb.com>
Message-Id: <20200529141407.158960-2-bdenes@scylladb.com>
@cor3ntin cor3ntin added LEWG Library Evolution and removed LWG Library labels Sep 21, 2020
@cor3ntin
Copy link

Author: There has been some design changes, this needs to go back to LEWG - I took the liberty to update the labels accordingly

@ben-craig ben-craig added the B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 label Oct 17, 2020
@wg21bot
Copy link
Collaborator

wg21bot commented Oct 21, 2020

P1206R2 ranges::to: A function to convert any range to a container (Corentin Jabot, Eric Niebler, Casey Carter)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Oct 21, 2020
@wg21bot wg21bot added this to the 2020-telecon milestone Oct 21, 2020
@brycelelbach brycelelbach added IS Ship vehicle: IS ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting C++23 Targeted at C++23 labels Nov 16, 2020
@wg21bot
Copy link
Collaborator

wg21bot commented Nov 23, 2020

P1206R3 ranges::to: A function to convert any range to a container (Corentin Jabot, Eric Niebler, Casey Carter)

@ben-craig ben-craig added the needs-revision Paper needs changes before it can proceed label Dec 17, 2020
@ben-craig
Copy link
Collaborator

ben-craig commented Dec 17, 2020

P1206R2: ranges::to

2020-12-14 Library Evolution Telecon Minutes

Chair: Ben Craig

Champion: Corentin Jabot

Minute Taker: Inbal Levi

Start: 2020-12-14 08:50 Pacific Standard

POLL: We want ranges::to to preallocate memory when using "reservable" containers in order to minimize allocations.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
9 6 0 0 0

Attendance: 24

# of Authors: 3

Author Position: SF, SF, No Vote

Outcome: Consensus in favor

POLL: Remove support for nested containers.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
0 0 3 6 2

Attendance: 24

# of Authors: 3

Author Position: SA, WA, No Vote

Outcome: Consensus against changing the paper

POLL: Put back support for syntax without parenthesis.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
0 1 8 4 0

Attendance: 25

# of Authors: 3

Outcome: No consensus to change the paper

POLL: We approve of the direction of P1206R3.

Attendance: 25

Outcome: No opposition to unanimous consent

End: 09:35

SUMMARY:
We discussed some of the challenges involved with the old, no parenthesis form of ranges::to. We also discussed some of the scoping of reservable types (it's not just vector!).

OUTCOME:

Bring back a revised paper. Figure out how to deal with container reservation to avoid wasted allocations and rehashes. Please add an example that includes vector self assignment.

@jensmaurer jensmaurer removed this from the 2020-telecon milestone Dec 27, 2020
@inbal2l inbal2l added SG9 Ranges SG and removed LEWG Library Evolution ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting labels Jun 8, 2021
@brycelelbach brycelelbach added needs-revision Paper needs changes before it can proceed scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review and removed scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Aug 1, 2021
@brycelelbach
Copy link

brycelelbach commented Aug 4, 2021

2021-08-03 Library Evolution Telecon

P1206R5: ranges::to

P1206R6: ranges::to

2021-08-03 Library Evolution Telecon Minutes

Chair: Bryce Adelstein Lelbach

Champion: Corentin Jabot

Minute Taker: Ben Craig

Start: 2021-08-03 14:04 Pacific

End: 14:17

Summary

When we reviewed and forwarded this paper to electronic polling on 2021-07-20, we looked at and forwarded R5 with some modifications (e.g. R6), but R5 and R6 have not yet appeared in a mailing, although they have been submitted. So, we briefly discussed the situation to confirm that the preprint of R6 on the isocpp.org paper system had the requested changes and that everyone was okay with polling it.

Outcome

Modify 2021 Summer Library Evolution Poll 3 to state that it's forwarding P1206R6.

@brycelelbach brycelelbach removed the needs-revision Paper needs changes before it can proceed label Aug 4, 2021
@wg21bot
Copy link
Collaborator

wg21bot commented Aug 23, 2021

P1206R5 Conversions from ranges to containers (Corentin Jabot, Eric Niebler, Casey Carter)

@wg21bot
Copy link
Collaborator

wg21bot commented Aug 23, 2021

P1206R6 Conversions from ranges to containers (Corentin Jabot, Eric Niebler, Casey Carter)

@inbal2l inbal2l removed scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review SG9 Ranges SG labels Aug 23, 2021
@brycelelbach brycelelbach added the scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review label Sep 6, 2021
@brycelelbach
Copy link

2021 Summer Library Evolution Polls

P2435: 2021 Summer Library Evolution Poll Outcomes

POLL 3: Send P1206R6 (ranges::to) to Library Working Group for C++23, classified as an addition (P0592R4 bucket 3 item).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
19 9 0 0 0

Outcome: Unanimous consensus in favor.

@brycelelbach brycelelbach added LWG Library lwg-pending LWG Chair needs to disposition and removed ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review LEWG Library Evolution labels Sep 6, 2021
@JeffGarland JeffGarland added lwg-prereview Needs LWG initial review before full group and removed lwg-pending LWG Chair needs to disposition labels Nov 3, 2021
@jensmaurer jensmaurer modified the milestones: 2021-telecon, 2022-telecon Jan 1, 2022
@JeffGarland
Copy link
Member

JeffGarland commented Jan 21, 2022

LWG reviewed and approved final wording 2022-01-21

Poll: Adopt P1206R7 to the C++ working draft for c++23.

F A N
11 0 0

@JeffGarland JeffGarland added tentatively-ready-for-plenary Reviewed between meetings; ready for a vote. and removed lwg-prereview Needs LWG initial review before full group B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 labels Jan 21, 2022
@wg21bot
Copy link
Collaborator

wg21bot commented Jan 22, 2022

P1206R7 Conversions from ranges to containers (Corentin Jabot, Eric Niebler, Casey Carter)

@cor3ntin cor3ntin added the plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. label Feb 7, 2022
@jensmaurer
Copy link
Member Author

Approved by WG21 plenary 2022-02-07

@cor3ntin cor3ntin removed the tentatively-ready-for-plenary Reviewed between meetings; ready for a vote. label Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++23 Targeted at C++23 IS Ship vehicle: IS LWG Library plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. ranges std::ranges
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

9 participants