Repository navigation
CWG2521 User-defined literals and reserved identifiers #1367
Description
Activity
EWG discussed this in our February 6th, 2023 afternoon session in Issaquah.
The following poll was taken:
The form of User Defined Literals that permits a space between the quotes and the name of the literal should be deprecated, and eventually removed. Additionally, the UDL name should be excluded from the restriction in lex.name in the non-deprecated form (sans space).
SF F N A SA 10 9 1 1 0 Result: Consensus
Forwarding to CWG.
@erichkeane , a User Defined Literal never permits a space between the quotes (if any) and the name of the literal. This is only permitted when declaring a literal operator function as specified in [over.literal]. I am interpreting EWG's poll to refer to the latter, not the former.
That is a correct interpretation @jensmaurer. Discussion concentrated on the declarations, and I was apparently imprecise on the poll. However, it was clear (via example) in the room what was meant.
Reacted by Jens MaurerSome implementers are concerned about the lack of space for implementation extensions. The suggestion is to reserve literal suffix identifiers starting with two underscores for the implementation in 16.4.5.3.6 [usrlit.suffix]. EWG is invited to comment on that direction.
CWG2521 has been updated accordingly.
EWG discussed this in the February 7th, 2023 Morning session in Issaquah. The following poll was taken.
CWG2521:
Suggest that LEWG amend the proposal for CWG2521 to reserve UDL declarations with double underscores anywhere for the implementation, then forward to CWG.SF F N A SA 3 14 5 3 0 Result: Consensus
@brycelelbach Attn! This is LEWG's wording, so this has to go to through LEWG first.
- addedB2 - improvementBucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between eBucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e
on Feb 7, 2023 13 remaining items
The LEWG poll isn't aligned with the EWG poll, and this doesn't seem intentional. The feedback to CWG should be clear. LEWG, please explicitly poll the same as EWG, or poll explicitly to go against EWG's poll.
POLL: Amend the proposed resolution for CWG2521 to reserve literal suffix identifiers with double underscores anywhere for implementation use (as recommended by EWG) then forward to CWG.
Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against 9 13 0 0 0 Attendance: many local 9 remote
# of Authors:
Author Position:
Outcome: Unanimous consent
Reacted by Inbal Levi@jwakely , @JeffGarland , the proposed resolution contains a one-sentence modification to a library clause. Please review CWG2521 (bottom).
(There is no poll evidence this is specifically postponed to C++26, so CWG will decide tomorrow whether to have this in C++23 or not. Does LWG have an opinion?)
- addedplenary-approvedPapers approved for inclusion in their target vehicle by plenary vote.Papers approved for inclusion in their target vehicle by plenary vote.
on Feb 11, 2023
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsApproved for plenary vote
- StatusShow more project fieldsDone
CWG2521
As explained in the issue, the normative rule does not give the outcome shown in the example. Even if it did, the significance of whitespace in this context is unfortunate.
CWG solicits EWG input on the handling of this issue.