Skip to content

CWG2521 User-defined literals and reserved identifiers  #1367

Description

@jensmaurer

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.

Activity

  1. added this to the 2023-telecon milestone on Jan 25, 2023
  2. erichkeane commented on Feb 7, 2023

    @erichkeane
    Collaborator

    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.

  3. added and removed
    EWGEvolution
    on Feb 7, 2023
  4. jensmaurer commented on Feb 7, 2023

    @jensmaurer
    MemberAuthor

    @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.

  5. erichkeane commented on Feb 7, 2023

    @erichkeane
    Collaborator

    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.

  6. jensmaurer commented on Feb 7, 2023

    @jensmaurer
    MemberAuthor

    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.

  7. added
    EWGEvolution
    and removed on Feb 7, 2023
  8. erichkeane commented on Feb 7, 2023

    @erichkeane
    Collaborator

    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

  9. added
    LEWGLibrary Evolution
    and removed
    EWGEvolution
    on Feb 7, 2023
  10. erichkeane commented on Feb 7, 2023

    @erichkeane
    Collaborator

    @brycelelbach Attn! This is LEWG's wording, so this has to go to through LEWG first.

  11. added
    B2 - improvementBucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e
    on Feb 7, 2023
  12. 13 remaining items

  13. jfbastien commented on Feb 8, 2023

    @jfbastien
    Collaborator

    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.

  14. added
    LEWGLibrary Evolution
    and removed on Feb 8, 2023
  15. ben-craig commented on Feb 8, 2023

    @ben-craig

    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

  16. added and removed
    LEWGLibrary Evolution
    on Feb 8, 2023
  17. jensmaurer commented on Feb 10, 2023

    @jensmaurer
    MemberAuthor

    @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?)

  18. added
    plenary-approvedPapers approved for inclusion in their target vehicle by plenary vote.
    on Feb 11, 2023
  19. moved this to Approved for plenary vote in CWGon Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    B2 - improvementBucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between eC++23Targeted at C++23CWGCoreISShip vehicle: ISLWGLibraryplenary-approvedPapers approved for inclusion in their target vehicle by plenary vote.size - smallpaper size estimate

    Type

    No type

    Projects

    • Status
      Approved for plenary vote

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions