From Jason Turner

[class.expl.init]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpw2pqu6w1/{from.md → to.md} +9 -10
tmp/tmpw2pqu6w1/{from.md → to.md} RENAMED
@@ -17,24 +17,23 @@ struct complex {
17
  complex(double,double);
18
  };
19
 
20
  complex sqrt(complex,complex);
21
 
22
- complex a(1); // initialize by a call of complex(double)
23
- complex b = a; // initialize by a copy of a
24
- complex c = complex(1,2); // construct complex(1,2) using complex(double,double),
25
- // copy/move it into c
26
- complex d = sqrt(b,c); // call sqrt(complex,complex) and copy/move the result into d
27
- complex e; // initialize by a call of complex()
28
- complex f = 3; // construct complex(3) using complex(double), copy/move it into f
29
- complex g = { 1, 2 }; // initialize by a call of complex(double, double)
30
  ```
31
 
32
  — *end example*]
33
 
34
- [*Note 1*: Overloading of the assignment operator ([[over.ass]]) has
35
- no effect on initialization. — *end note*]
36
 
37
  An object of class type can also be initialized by a *braced-init-list*.
38
  List-initialization semantics apply; see  [[dcl.init]] and 
39
  [[dcl.init.list]].
40
 
 
17
  complex(double,double);
18
  };
19
 
20
  complex sqrt(complex,complex);
21
 
22
+ complex a(1); // initialized by calling complex(double) with argument 1
23
+ complex b = a; // initialized as a copy of a
24
+ complex c = complex(1,2); // initialized by calling complex(double,double) with arguments 1 and 2
25
+ complex d = sqrt(b,c); // initialized by calling sqrt(complex,complex) with d as its result object
26
+ complex e; // initialized by calling complex()
27
+ complex f = 3; // initialized by calling complex(double) with argument 3
28
+ complex g = { 1, 2 }; // initialized by calling complex(double, double) with arguments 1 and 2
 
29
  ```
30
 
31
  — *end example*]
32
 
33
+ [*Note 1*: Overloading of the assignment operator [[over.ass]] has no
34
+ effect on initialization. — *end note*]
35
 
36
  An object of class type can also be initialized by a *braced-init-list*.
37
  List-initialization semantics apply; see  [[dcl.init]] and 
38
  [[dcl.init.list]].
39