Skip to content

Commit 51ddb91

Browse files
authored
Merge 2024-03 CWG Motion 5
P3034R1 Module Declarations Shouldn’t be Macros
2 parents 56c4cb9 + 8a54fcf commit 51ddb91

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

source/preprocessor.tex

+26
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,32 @@
759759
or (if it is the first token of the \grammarterm{pp-module}) \tcode{export}
760760
is an identifier defined as an object-like macro.
761761

762+
\pnum
763+
The \grammarterm{pp-tokens}, if any, of a \grammarterm{pp-module}
764+
shall be of the form:
765+
\begin{ncsimplebnf}
766+
pp-module-name \opt{pp-module-partition} \opt{pp-tokens}
767+
\end{ncsimplebnf}
768+
where the \grammarterm{pp-tokens} (if any) shall not begin with
769+
a \tcode{(} preprocessing token and
770+
the grammar non-terminals are defined as:
771+
\begin{ncbnf}
772+
\nontermdef{pp-module-name}\br
773+
\opt{pp-module-name-qualifier} identifier
774+
\end{ncbnf}
775+
\begin{ncbnf}
776+
\nontermdef{pp-module-partition}\br
777+
\terminal{:} \opt{pp-module-name-qualifier} identifier
778+
\end{ncbnf}
779+
\begin{ncbnf}
780+
\nontermdef{pp-module-name-qualifier}\br
781+
identifier \terminal{.}\br
782+
pp-module-name-qualifier identifier \terminal{.}
783+
\end{ncbnf}
784+
No \grammarterm{identifier} in
785+
the \grammarterm{pp-module-name} or \grammarterm{pp-module-partition}
786+
shall currently be defined as an object-like macro.
787+
762788
\pnum
763789
Any preprocessing tokens after the \tcode{module} preprocessing token
764790
in the \tcode{module} directive are processed just as in normal text.

0 commit comments

Comments
 (0)