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
Comments
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)
C++ compound literals should only work for trivial types (so that destructors aren't an issue)
C++ compound literals should match C++'s temporary object lifetime semantics
C++ compound literals should match C's block lifetime semantics
|
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?
Overall: consensus, but low attendance |
P2174R1 Compound Literals (Zhihao Yuan) |
EWG would be interested in seeing compound literals if they ONLY included types without destructors.
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.
Result: Not Consensus |
Closing, there was not consensus for further work here, will re-open if a followup paper comes with additional motivation. |
P2174R0 Compound Literals (Zhihao Yuan)
The text was updated successfully, but these errors were encountered: