Date: Mon, 6 Apr 2026 23:19:40 -0700 (PDT)
It refers to the `()`-enclosed version of aggregate-like initialization, which became available in C++20. E.g.
int a[]( 1, 2, 3, 4 );
struct XY { int x, y; } xy( 1, 2 );
> On 04/06/2026 7:17 PM PDT rjshaw--- via Std-Discussion <std-discussion_at_[hidden]> wrote:
>
>
> In [dcl.init.general] :
>
> -------------------------------------------------------------------------------------------------------
> — If the initializer is a (non-parenthesized) braced-init-list or is = braced-init-list, the object or reference is
> list-initialized (9.4.5).
>
> ...
>
> — Otherwise, if the destination type is an array, the object is initialized as follows. Let x1 , . . . , xk be
> the elements of the expression-list. ...
> -------------------------------------------------------------------------------------------------------
>
> The first case is for constructs like "int a[] = {1,2,3};", because "a" is an "object" [dcl.array].
>
> What construct does the second case apply to ?
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
int a[]( 1, 2, 3, 4 );
struct XY { int x, y; } xy( 1, 2 );
> On 04/06/2026 7:17 PM PDT rjshaw--- via Std-Discussion <std-discussion_at_[hidden]> wrote:
>
>
> In [dcl.init.general] :
>
> -------------------------------------------------------------------------------------------------------
> — If the initializer is a (non-parenthesized) braced-init-list or is = braced-init-list, the object or reference is
> list-initialized (9.4.5).
>
> ...
>
> — Otherwise, if the destination type is an array, the object is initialized as follows. Let x1 , . . . , xk be
> the elements of the expression-list. ...
> -------------------------------------------------------------------------------------------------------
>
> The first case is for constructs like "int a[] = {1,2,3};", because "a" is an "object" [dcl.array].
>
> What construct does the second case apply to ?
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
Received on 2026-04-07 06:19:47
