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

P2174 Compound Literals #883

Closed
wg21bot opened this issue May 21, 2020 · 5 comments
Closed

P2174 Compound Literals #883

wg21bot opened this issue May 21, 2020 · 5 comments
Labels
EWG Evolution
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented May 21, 2020

P2174R0 Compound Literals (Zhihao Yuan)

@wg21bot wg21bot added the EWGI Evolution Incubator label May 21, 2020
@wg21bot wg21bot added this to the 2020-telecon milestone May 21, 2020
@jfbastien jfbastien added EWG Evolution and removed EWGI Evolution Incubator labels Sep 22, 2020
@jfbastien
Copy link
Collaborator

Discussed in today's EWG telecon. One notable action item is to sync with the C committee people on this.

Polls:

Add compound literal to C++ (assuming my favored solution to the lifetime issues are addressed)

SF F N A SA
3 2 12 3 1

C++ compound literals should only work for trivial types (so that destructors aren't an issue)

SF F N S SA
1 8 7 0 4

C++ compound literals should match C++'s temporary object lifetime semantics

SF F N S SA
2 6 4 2 1

C++ compound literals should match C's block lifetime semantics

SF F N S SA
2 3 6 3 1

@jfbastien jfbastien added the needs-revision Paper needs changes before it can proceed label Oct 8, 2020
@jensmaurer jensmaurer removed this from the 2020-telecon milestone Dec 27, 2020
@AaronBallman AaronBallman added the SG22 C / C++ liaison label Feb 12, 2021
@AaronBallman
Copy link
Collaborator

AaronBallman commented Apr 1, 2022

This paper was discussed at the Apr 1, 2022 SG22 teleconference and we took one poll:

Does SG22 prefer C semantics (lifetime, storage duration, value category) for C types (std::is_trivially_destructible) for compound literals in P2174R0?

Committee For Against Abstain Notes
WG14 4 0 0 consensus
WG21 5 1 0 consensus

Overall: consensus, but low attendance

@AaronBallman AaronBallman removed the SG22 C / C++ liaison label Apr 20, 2022
@wg21bot
Copy link
Collaborator Author

wg21bot commented Apr 25, 2022

P2174R1 Compound Literals (Zhihao Yuan)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Apr 25, 2022
@wg21bot wg21bot added this to the 2022-telecon milestone Apr 25, 2022
@erichkeane
Copy link
Collaborator

EWG would be interested in seeing compound literals if they ONLY included types without destructors.

SF F N A SA
1 2 8 1 1

Result: Not Consensus

EWG would be interested in seeing compound literals with the subset of storage class specifiers in the new C syntax for N3038.

SF F N A SA
0 3 6 1 0

Result: Not Consensus

@erichkeane
Copy link
Collaborator

Closing, there was not consensus for further work here, will re-open if a followup paper comes with additional motivation.

@jensmaurer jensmaurer modified the milestones: 2022-telecon, 2022-11 Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EWG Evolution
Projects
None yet
Development

No branches or pull requests

5 participants