This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


989. Misplaced list-initialization example

Section: 9.4.5  [dcl.init.list]     Status: CD2     Submitter: Daniel Krügler     Date: 20 October, 2009

[Voted into WP at March, 2010 meeting.]

The final set of declarations in the example following 9.4.5 [dcl.init.list] bullet 3.3 is:

    struct S2 {
      int m1;
      double m2,m3;
    };
    S2 s21 = { 1, 2, 3.0 };    // OK
    S2 s22 { 1.0, 2, 3 };      // error: narrowing
    S2 s23 {};                 // OK: default to 0,0,0

However, S2 is an aggregate. Aggregates are handled in bullet 1, while bullet 3 deals with classes with constructors. This part of the example should be moved to the first bullet.

Proposed resolution (October, 2009):

Move the S2 example from bullet 3 to bullet 1 in 9.4.5 [dcl.init.list] paragraph 3: