[lex.name] (original) (raw)

5 Lexical conventions [lex]

5.11 Identifiers [lex.name]

identifier-start:
nondigit
an element of the translation character set with the Unicode property XID_Start

identifier-continue:
digit
nondigit
an element of the translation character set with the Unicode property XID_Continue

nondigit: one of
a b c d e f g h i j k l m
n o p q r s t u v w x y z
A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z _

digit: one of
0 1 2 3 4 5 6 7 8 9

[Note 1:

The character properties XID_Start and XID_Continue are described by UAX #44 of the Unicode Standard.13

— _end note_]

The program is ill-formed if an identifier does not conform to Normalization Form C as specified in the Unicode Standard.

[Note 2:

Identifiers are case-sensitive.

— _end note_]

[Note 3:

[uaxid] compares the requirements of UAX #31 of the Unicode Standard with the C++ rules for identifiers.

— _end note_]

The identifiers in Table 4 have a special meaning when appearing in a certain context.

When referred to in the grammar, these identifiers are used explicitly rather than using the identifier grammar production.

Unless otherwise specified, any ambiguity as to whether a givenidentifier has a special meaning is resolved to interpret the token as a regular identifier.

In addition, some identifiers appearing as a token or preprocessing-tokenare reserved for use by C++ implementations and shall not be used otherwise; no diagnostic is required.