|
1329 | 1329 | The locus of a \grammarterm{for-range-declaration}
|
1330 | 1330 | of a range-based \keyword{for} statement\iref{stmt.ranged}
|
1331 | 1331 | is immediately after the \grammarterm{for-range-initializer}.
|
| 1332 | +The locus of a \grammarterm{for-range-declaration} |
| 1333 | +of an expansion statement\iref{stmt.expand} |
| 1334 | +is immediately after the \grammarterm{expansion-initializer}. |
1332 | 1335 |
|
1333 | 1336 | \pnum
|
1334 | 1337 | The locus of a \grammarterm{template-parameter} is immediately after it.
|
|
1389 | 1392 | Each
|
1390 | 1393 | \begin{itemize}
|
1391 | 1394 | \item
|
1392 |
| -selection or iteration statement\iref{stmt.select,stmt.iter}, |
| 1395 | +selection, iteration, or expansion statement\iref{stmt.select,stmt.iter,stmt.expand}, |
1393 | 1396 | \item
|
1394 | 1397 | substatement of such a statement,
|
1395 | 1398 | \item
|
|
4763 | 4766 | \pnum
|
4764 | 4767 | \indextext{initializer!temporary and declarator}%
|
4765 | 4768 | \indextext{temporary!order of destruction of}%
|
4766 |
| -There are five contexts in which temporaries are destroyed at a different |
| 4769 | +There are several contexts in which temporaries are destroyed at a different |
4767 | 4770 | point than the end of the full-expression.
|
4768 | 4771 | The first context is when a default constructor is called to initialize
|
4769 | 4772 | an element of an array with no corresponding initializer\iref{dcl.init}.
|
|
4883 | 4886 |
|
4884 | 4887 | \pnum
|
4885 | 4888 | The fourth context is when a temporary object
|
4886 |
| -is created in the \grammarterm{for-range-initializer} of a range-based \keyword{for} statement. |
| 4889 | +is created in the \grammarterm{for-range-initializer} of |
| 4890 | +either a range-based \keyword{for} statement |
| 4891 | +or an enumerating expansion statement\iref{stmt.expand}. |
4887 | 4892 | If such a temporary object would otherwise be destroyed
|
4888 | 4893 | at the end of the \grammarterm{for-range-initializer} full-expression,
|
4889 | 4894 | the object persists for the lifetime of the reference
|
4890 | 4895 | initialized by the \grammarterm{for-range-initializer}.
|
4891 | 4896 |
|
4892 | 4897 | \pnum
|
4893 |
| -The fifth context is when a temporary object |
| 4898 | +The fifth context is when a temporary object is created |
| 4899 | +in the \grammarterm{expansion-initializer} |
| 4900 | +of an iterating or destructuring expansion statement. |
| 4901 | +If such a temporary object would otherwise be destroyed |
| 4902 | +at the end of that \grammarterm{expansion-initializer}, |
| 4903 | +the object persists for the lifetime of the reference |
| 4904 | +initialized by the \grammarterm{expansion-initializer}, if any. |
| 4905 | + |
| 4906 | +\pnum |
| 4907 | +The sixth context is when a temporary object |
4894 | 4908 | is created in a structured binding declaration\iref{dcl.struct.bind}.
|
4895 | 4909 | Any temporary objects introduced by
|
4896 | 4910 | the \grammarterm{initializer}{s} for the variables
|
|
0 commit comments