Skip to content

Commit c66ef0b

Browse files
timsong-cpptkoeppe
authored andcommitted
Move \opt out of \grammarterm (#1554)
1 parent 5babbba commit c66ef0b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

source/declarations.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,7 +1969,7 @@
19691969
in that \grammarterm{attribute-specifier-seq} are thereafter considered attributes of the
19701970
enumeration whenever it is named.
19711971
A \tcode{:} following
1972-
``\tcode{enum} \grammarterm{nested-name-specifier\opt} \grammarterm{identifier}''
1972+
``\tcode{enum} \grammarterm{nested-name-specifier}\opt{} \grammarterm{identifier}''
19731973
within the \grammarterm{decl-specifier-seq} of a \grammarterm{member-declaration}
19741974
is parsed as part of an \grammarterm{enum-base}.
19751975
\begin{note} This resolves a potential ambiguity between the declaration of an enumeration
@@ -2473,7 +2473,7 @@
24732473
whose \grammarterm{class-head-name} (Clause \ref{class}) or
24742474
\grammarterm{enum-head-name}~(\ref{dcl.enum}) is an \grammarterm{identifier}, or
24752475
whose \grammarterm{elaborated-type-specifier} is of the form \grammarterm{class-key}
2476-
\grammarterm{attribute-specifier-seq\opt} \grammarterm{identifier}~(\ref{dcl.type.elab}), or
2476+
\grammarterm{attribute-specifier-seq}\opt{} \grammarterm{identifier}~(\ref{dcl.type.elab}), or
24772477
that is an \grammarterm{opaque-enum-declaration},
24782478
declares (or redeclares) its \grammarterm{unqualified-id} or
24792479
\grammarterm{identifier} as a member of \tcode{N}.

source/declarators.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@
432432

433433
where
434434
\tcode{T}
435-
is of the form \grammarterm{attribute-specifier-seq\opt}
435+
is of the form \grammarterm{attribute-specifier-seq}\opt{}
436436
\grammarterm{decl-specifier-seq}
437437
and
438438
\tcode{D}
@@ -474,7 +474,7 @@
474474

475475
\pnum
476476
In a declaration
477-
\grammarterm{attribute-specifier-seq\opt}
477+
\grammarterm{attribute-specifier-seq}\opt{}
478478
\tcode{T}
479479
\tcode{D}
480480
where
@@ -1258,7 +1258,7 @@
12581258
\tcode{noexcept}\opt
12591259
function of
12601260
(\grammarterm{parameter-declaration-clause} )
1261-
\grammarterm{cv-qualifier-seq\opt} \grammarterm{ref-qualifier\opt}
1261+
\grammarterm{cv-qualifier-seq}\opt{} \grammarterm{ref-qualifier}\opt{}
12621262
returning \tcode{T}'',
12631263
where the optional \tcode{noexcept} is present
12641264
if and only if

source/expressions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@
19161916

19171917
\item Otherwise, if \tcode{E1.E2} refers to a non-static member
19181918
function and the type of \tcode{E2} is ``function of
1919-
parameter-type-list \cvqual{cv} \grammarterm{ref-qualifier\opt} returning \tcode{T}'', then
1919+
parameter-type-list \cvqual{cv} \grammarterm{ref-qualifier}\opt{} returning \tcode{T}'', then
19201920
\tcode{E1.E2} is a prvalue. The expression designates a
19211921
non-static member function. The expression can be used only as the
19221922
left-hand operand of a member function call~(\ref{class.mfct}).

source/iostreams.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10113,8 +10113,8 @@
1011310113
A sequence of elements that identify
1011410114
the location of a file within a filesystem.
1011510115
The elements are the
10116-
\grammarterm{root-name\opt},
10117-
\grammarterm{root-directory\opt},
10116+
\grammarterm{root-name}\opt{},
10117+
\grammarterm{root-directory}\opt{},
1011810118
and an optional sequence of filenames.
1011910119
The maximum number of elements in the sequence is operating system dependent.
1012010120

0 commit comments

Comments
 (0)