|
5953 | 5953 | \impldef{maximum size of an allocated object} limit\iref{implimits}; or |
5954 | 5954 |
|
5955 | 5955 | \item |
5956 | | -the \grammarterm{new-initializer} is a \grammarterm{braced-init-list} and the |
| 5956 | +the \grammarterm{new-initializer} is a \grammarterm{braced-init-list} |
| 5957 | +or a parenthesized \grammarterm{expression-list} and the |
5957 | 5958 | number of array elements for which initializers are provided (including the |
5958 | 5959 | terminating \tcode{'\textbackslash 0'} in a \grammarterm{string-literal}\iref{lex.string}) exceeds the |
5959 | 5960 | number of elements to initialize. |
|
5983 | 5984 |
|
5984 | 5985 | \pnum |
5985 | 5986 | If the allocated type is an array, |
5986 | | -the \grammarterm{new-initializer} is a \grammarterm{braced-init-list}, and |
| 5987 | +the \grammarterm{new-initializer} is a \grammarterm{braced-init-list} |
| 5988 | +or a parenthesized \grammarterm{expression-list}, and |
5987 | 5989 | the \grammarterm{expression} |
5988 | 5990 | is potentially-evaluated and not a core constant expression, |
5989 | | -the semantic constraints of copy-initializing a hypothetical element of |
5990 | | -the array from an empty initializer list |
5991 | | -are checked\iref{dcl.init.list}. |
| 5991 | +the semantic constraints of initializing a hypothetical element of |
| 5992 | +the array are checked as follows: |
| 5993 | +\begin{itemize} |
| 5994 | +\item |
| 5995 | +If the \grammarterm{new-initializer} is a \grammarterm{braced-init-list}, |
| 5996 | +the hypothetical element is copy-initialized |
| 5997 | +from an empty initializer list\iref{dcl.init.list}. |
| 5998 | +\item |
| 5999 | +Otherwise, the hypothetical element is value-initialized\iref{dcl.init.general}. |
| 6000 | +\end{itemize} |
5992 | 6001 | \begin{note} |
5993 | 6002 | The array can contain more elements than there are |
5994 | | -elements in the \grammarterm{braced-init-list}, |
5995 | | -requiring initialization of the remainder of the array elements from |
5996 | | -an empty initializer list. |
| 6003 | +elements in the \grammarterm{new-initializer}, |
| 6004 | +requiring initialization of the remainder of the array elements as appropriate. |
5997 | 6005 | \end{note} |
5998 | 6006 |
|
5999 | 6007 | \pnum |
|
0 commit comments