From Jason Turner

[diff.cpp11.dcl.decl]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpll1eld26/{from.md → to.md} +21 -0
tmp/tmpll1eld26/{from.md → to.md} RENAMED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Clause [[dcl.decl]]: declarators <a id="diff.cpp11.dcl.decl">[[diff.cpp11.dcl.decl]]</a>
2
+
3
+ [[dcl.init.aggr]] **Change:** Classes with default member initializers
4
+ can be aggregates. **Rationale:** Necessary to allow default member
5
+ initializers to be used by aggregate initialization. **Effect on
6
+ original feature:** Valid C++11code may fail to compile or may change
7
+ meaning in this International Standard.
8
+
9
+ ``` cpp
10
+ struct S { // Aggregate in C++14onwards.
11
+ int m = 1;
12
+ };
13
+ struct X {
14
+ operator int();
15
+ operator S();
16
+ };
17
+ X a{};
18
+ S b{a}; // uses copy constructor in C++11,
19
+ // performs aggregate initialization in this International Standard
20
+ ```
21
+