Skip to content

Commit 484d98e

Browse files
jensmaurerzygoloid
authored andcommitted
CWG2285 Issues with structured bindings
1 parent 9c733af commit 484d98e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

source/basic.tex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,9 +808,14 @@
808808

809809
\pnum
810810
The point of declaration for a function-local predefined
811-
variable\iref{dcl.fct.def} is immediately before the
811+
variable\iref{dcl.fct.def.general} is immediately before the
812812
\grammarterm{function-body} of a function definition.
813813

814+
\pnum
815+
The point of declaration of a structured binding\iref{dcl.struct.bind}
816+
is immediately after
817+
the \grammarterm{identifier-list} of the structured binding declaration.
818+
814819
\pnum
815820
The point of declaration for the variable or the structured bindings
816821
declared in the \grammarterm{for-range-declaration}

source/declarators.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,6 +2297,11 @@
22972297
\tcode{E} is never a reference type\iref{expr.prop}.
22982298
\end{note}
22992299

2300+
\pnum
2301+
If the \grammarterm{initializer} refers to
2302+
one of the names introduced by the structured binding declaration,
2303+
the program is ill-formed.
2304+
23002305
\pnum
23012306
If \tcode{E} is an array type with element type \tcode{T}, the number
23022307
of elements in the \grammarterm{identifier-list} shall be equal to the

0 commit comments

Comments
 (0)