You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CWG2521 User-defined literals and reserved identifiers #1367
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.
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).
@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.
Some 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.
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.
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.
@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?)
Activity
erichkeane commentedon Feb 7, 2023
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).
Result: Consensus
Forwarding to CWG.
jensmaurer commentedon Feb 7, 2023
@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.
erichkeane commentedon Feb 7, 2023
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.
jensmaurer commentedon Feb 7, 2023
Some 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.
erichkeane commentedon Feb 7, 2023
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.
Result: Consensus
erichkeane commentedon Feb 7, 2023
@brycelelbach Attn! This is LEWG's wording, so this has to go to through LEWG first.
13 remaining items
jfbastien commentedon Feb 8, 2023
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.
ben-craig commentedon Feb 8, 2023
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.
Attendance: many local 9 remote
# of Authors:
Author Position:
Outcome: Unanimous consent
jensmaurer commentedon Feb 10, 2023
@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?)