Closed
Description
First sentence in [lex.ext]/1:
If a token matches both user-defined-literal and another literal kind, it is treated as the latter.
I don't think this is necessary as the non-terminal user-defined-literal is already the last item in the definition of the literal grammar production.
Thus, I think this paragraph could be simplified as follows:
- The syntactic non-terminal preceding the ud-suffix in a user-defined-literal is taken to be the longest sequence of characters that could match that non-terminal. [ Example: 123_km is a user-defined-literal, but 12LL is an integer-literal. — end example ]
Activity
jensmaurer commentedon Jun 3, 2020
There is no implied ordering in the presentation of grammar options, so we do need the disambiguation in the first sentence.