Skip to content

Commit 672bb60

Browse files
jensmaurerzygoloid
authored andcommitted
[dcl.init] Clarify introduction
Fixes #1615.
1 parent 7c6f936 commit 672bb60

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

source/declarators.tex

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,15 +2378,11 @@
23782378
\indextext{initialization|(}
23792379

23802380
\pnum
2381-
A declarator can specify an initial value for the
2382-
identifier being declared.
2383-
The identifier designates a variable being initialized.
2384-
The process of initialization described in the
2385-
remainder of~\ref{dcl.init}
2386-
applies also to initializations
2387-
specified by other syntactic contexts, such as the initialization
2388-
of function parameters\iref{expr.call} or
2389-
the initialization of return values\iref{stmt.return}.
2381+
The process of initialization described in this subclause applies to
2382+
all initializations regardless of syntactic context, including the
2383+
initialization of a function parameter\iref{expr.call}, the
2384+
initialization of a return value\iref{stmt.return}, or when an
2385+
initializer follows a declarator.
23902386

23912387
\begin{bnf}
23922388
\nontermdef{initializer}\br
@@ -2441,6 +2437,12 @@
24412437
braced-init-list
24422438
\end{bnf}
24432439

2440+
\begin{note}
2441+
The rules in this subclause apply even if the grammar permits only
2442+
the \grammarterm{brace-or-equal-initializer} form
2443+
of \grammarterm{initializer} in a given context.
2444+
\end{note}
2445+
24442446
\pnum
24452447
Except for objects declared with the \tcode{constexpr} specifier, for which see~\ref{dcl.constexpr},
24462448
an \grammarterm{initializer} in the definition of a variable can consist of

0 commit comments

Comments
 (0)