cplusplus / cplusplus/draft

[lex.name] p3 contradicts to [usrlit.suffix]p1

Open
#5,187 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

[usrlit.suffix]p1 says

Literal suffix identifiers that do not start with an underscore are reserved for future standardization.

Some literal suffix identifiers are reserved for future standardization; see [usrlit.suffix]. A declaration whose literal-operator-id uses such a literal suffix identifier is ill-formed, no diagnostic required.

That means the identifier in a literal-operator-id at least to have an initial underscore is guaranteed to be valid. However, [lex.name] p3 says

In addition, some identifiers are reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required.

  • Each identifier that contains a double underscore __ or begins with an underscore followed by an uppercase letter is reserved to the implementation for any use.
  • Each identifier that begins with an underscore is reserved to the implementation for use as a name in the global namespace.

what the form of an identifier stated by the above two bullets can be a valid form in a literal-operator-id, however, as the emphasized wording, [lex.name] p3 explicitly says these identifiers shall not be used otherwise. These two provisions seem to conflict with each other.

Proposal:

change [lex.name] p3 to that

In addition, some identifiers are reserved for use by C++ implementations and shall not be used otherwise unless as the ud-suffixs; no diagnostic is required.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the cited [lex.name] p3 and [usrlit.suffix] p1 provisions together, then review the 13-comment discussion for existing interpretations. Compare the proposed wording with the surrounding standard text and determine whether it resolves the apparent conflict without creating new ambiguity. Done means an agreed editorial resolution or revised proposal.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.