Skip to content

Commit 515954f

Browse files
committed
[dcl.init] Clarify introduction
Fixes #1615.
1 parent c42d836 commit 515954f

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
@@ -2388,15 +2388,11 @@
23882388
\indextext{initialization|(}
23892389

23902390
\pnum
2391-
A declarator can specify an initial value for the
2392-
identifier being declared.
2393-
The identifier designates a variable being initialized.
2394-
The process of initialization described in the
2395-
remainder of~\ref{dcl.init}
2396-
applies also to initializations
2397-
specified by other syntactic contexts, such as the initialization
2398-
of function parameters (\ref{expr.call}) or
2399-
the initialization of return values (\ref{stmt.return}).
2391+
The process of initialization described in this subclause applies to
2392+
all initializations regardless of syntactic context, including the
2393+
initialization of a function parameter (\ref{expr.call}), the
2394+
initialization of a return value (\ref{stmt.return}), or when an
2395+
initializer follows a declarator.
24002396

24012397
\begin{bnf}
24022398
\nontermdef{initializer}\br
@@ -2434,6 +2430,12 @@
24342430
braced-init-list
24352431
\end{bnf}
24362432

2433+
\begin{note}
2434+
The rules in this subclause apply even if the grammar permits only
2435+
the \grammarterm{brace-or-equal-initializer} form
2436+
of \grammarterm{initializer} in a given context.
2437+
\end{note}
2438+
24372439
\pnum
24382440
Except for objects declared with the \tcode{constexpr} specifier, for which see~\ref{dcl.constexpr},
24392441
an \grammarterm{initializer} in the definition of a variable can consist of

0 commit comments

Comments
 (0)