Skip to content

Commit 5b0e95f

Browse files
committed
[dcl.init] Clarify introduction
Fixes #1615.
1 parent 355a20b commit 5b0e95f

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
@@ -2379,15 +2379,11 @@
23792379
\indextext{initialization|(}
23802380

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

23922388
\begin{bnf}
23932389
\nontermdef{initializer}\br
@@ -2442,6 +2438,12 @@
24422438
braced-init-list
24432439
\end{bnf}
24442440

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

0 commit comments

Comments
 (0)