From Jason Turner

[class.prop]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp3gxzo8ep/{from.md → to.md} +10 -8
tmp/tmp3gxzo8ep/{from.md → to.md} RENAMED
@@ -1,12 +1,12 @@
1
  ## Properties of classes <a id="class.prop">[[class.prop]]</a>
2
 
3
  A *trivially copyable class* is a class:
4
 
5
  - that has at least one eligible copy constructor, move constructor,
6
- copy assignment operator, or move assignment operator ([[special]],
7
- [[class.copy.ctor]], [[class.copy.assign]]),
8
  - where each eligible copy constructor, move constructor, copy
9
  assignment operator, and move assignment operator is trivial, and
10
  - that has a trivial, non-deleted destructor [[class.dtor]].
11
 
12
  A *trivial class* is a class that is trivially copyable and has one or
@@ -29,13 +29,13 @@ A class `S` is a *standard-layout class* if it:
29
  - has all non-static data members and bit-fields in the class and its
30
  base classes first declared in the same class, and
31
  - has no element of the set M(S) of types as a base class, where for any
32
  type `X`, M(X) is defined as follows.[^1]
33
  \[*Note 2*: M(X) is the set of the types of all non-base-class
34
- subobjects that may be at a zero offset in `X`. — *end note*]
35
- - If `X` is a non-union class type with no (possibly inherited
36
- [[class.derived]]) non-static data members, the set M(X) is empty.
37
  - If `X` is a non-union class type with a non-static data member of
38
  type X₀ that is either of zero size or is the first non-static data
39
  member of `X` (where said member may be an anonymous union), the set
40
  M(X) consists of X₀ and the elements of M(X₀).
41
  - If `X` is a union type, the set M(X) is the union of all M(Uᵢ) and
@@ -100,9 +100,11 @@ struct POD { // both trivial and standard-layout
100
  — *end example*]
101
 
102
  [*Note 4*: Aggregates of class type are described in 
103
  [[dcl.init.aggr]]. — *end note*]
104
 
105
- A class `S` is an *implicit-lifetime class* if it is an aggregate or has
106
- at least one trivial eligible constructor and a trivial, non-deleted
107
- destructor.
 
 
108
 
 
1
  ## Properties of classes <a id="class.prop">[[class.prop]]</a>
2
 
3
  A *trivially copyable class* is a class:
4
 
5
  - that has at least one eligible copy constructor, move constructor,
6
+ copy assignment operator, or move assignment operator
7
+ [[special]], [[class.copy.ctor]], [[class.copy.assign]],
8
  - where each eligible copy constructor, move constructor, copy
9
  assignment operator, and move assignment operator is trivial, and
10
  - that has a trivial, non-deleted destructor [[class.dtor]].
11
 
12
  A *trivial class* is a class that is trivially copyable and has one or
 
29
  - has all non-static data members and bit-fields in the class and its
30
  base classes first declared in the same class, and
31
  - has no element of the set M(S) of types as a base class, where for any
32
  type `X`, M(X) is defined as follows.[^1]
33
  \[*Note 2*: M(X) is the set of the types of all non-base-class
34
+ subobjects that can be at a zero offset in `X`. — *end note*]
35
+ - If `X` is a non-union class type with no non-static data members,
36
+ the set M(X) is empty.
37
  - If `X` is a non-union class type with a non-static data member of
38
  type X₀ that is either of zero size or is the first non-static data
39
  member of `X` (where said member may be an anonymous union), the set
40
  M(X) consists of X₀ and the elements of M(X₀).
41
  - If `X` is a union type, the set M(X) is the union of all M(Uᵢ) and
 
100
  — *end example*]
101
 
102
  [*Note 4*: Aggregates of class type are described in 
103
  [[dcl.init.aggr]]. — *end note*]
104
 
105
+ A class `S` is an *implicit-lifetime class* if
106
+
107
+ - it is an aggregate whose destructor is not user-provided or
108
+ - it has at least one trivial eligible constructor and a trivial,
109
+ non-deleted destructor.
110