Title
Missing description of incompatibility from aggregate NSDMIs
Status
cd3
Section
_N4750_.C.3.5 [diff.cpp11.dcl.decl]
Submitter
Ville Voutilainen

Created on 2015-04-14.00:00:00 last changed 87 months ago

Messages

Date: 2015-05-15.00:00:00

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.

Date: 2022-02-18.07:47:23

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].

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: review -> cd3
2015-05-25 00:00:00adminsetmessages: + msg5479
2015-04-14 00:00:00admincreate