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

2024-04-18


2114. Missing description of incompatibility from aggregate NSDMIs

Section: _N4750_.C.3.5  [diff.cpp11.dcl.decl]     Status: CD3     Submitter: Ville Voutilainen     Date: 2015-04-14

The following example illustrates an incompatibility between C++11 and C++14:

  struct S {
    int m = 1;
  };        // C++11: S is non-aggregate
            // C++14: S is AGGREGATE
  struct X {
      operator int();
      operator S();
  };

  int main() {
    X a{};
    S b{a};  // C++11: valid, copy constr S(a.operator S()) is called here
             // C++14: valid, aggregate initialization { a.operator int() }

    printf("%d\n", b.m);
  }

This should be documented in Annex Clause Annex C [diff].

Notes from the May, 2015 meeting:

This will be handled editorially; the status has been set to "review" to check that the editorial change has been made.