Created on 2001-12-09.00:00:00 last changed 197 months ago
[Voted into WP at October 2003 meeting.]
Proposed Resolution (revised October 2002):
Change 11.4.5 [class.ctor] paragraph 5-6 as follows:
A default constructor for a class X is a constructor of class X that can be called without an argument. If there is no
user-declareduser-declared constructor for class X, a default constructor is implicitly declared. Animplicitly-declaredimplicitly-declared default constructor is an inline public member of its class. A default constructor is trivial if it isanimplicitly-declareddefault constructorand if:
- its class has no virtual functions (11.7.3 [class.virtual]) and no virtual base classes (11.7.2 [class.mi]), and
- all the direct base classes of its class have trivial default constructors, and
- for all the nonstatic data members of its class that are of class type (or array thereof), each such class has a trivial default constructor.
Otherwise, the default constructor is non-trivial.
Change 11.4.7 [class.dtor] paragraphs 3-4 as follows (the main changes are removing italics):
If a class has no
user-declareduser-declared destructor, a destructor is declared implicitly. Animplicitly-declaredimplicitly-declared destructor is an inline public member of its class. A destructor is trivial if it isanimplicitly-declareddestructorand if:
- all of the direct base classes of its class have trivial destructors and
- for all of the non-static data members of its class that are of class type (or array thereof), each such class has a trivial destructor.
Otherwise, the destructor is
non-trivialnon-trivial.
In 11.5 [class.union] paragraph 1, change "trivial constructor" to "trivial default constructor".
In 6.7.7 [class.temporary] paragraph 3, add to the reference to 11.4.5 [class.ctor] a second reference, to 11.4.5.3 [class.copy.ctor].
In 11.4.5 [class.ctor] paragraph 5, the standard says "A constructor is trivial if [...]", and goes on to define a trivial default constructor. Taken literally, this would mean that a copy constructor can't be trivial (contrary to 11.4.5.3 [class.copy.ctor] paragraph 6). I suggest changing this to "A default constructor is trivial if [...]". (I think the change is purely editorial.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2004-04-09 00:00:00 | admin | set | messages: + msg1017 |
2003-11-15 00:00:00 | admin | set | status: ready -> wp |
2003-04-25 00:00:00 | admin | set | status: review -> ready |
2002-05-10 00:00:00 | admin | set | messages: + msg627 |
2002-05-10 00:00:00 | admin | set | status: open -> review |
2001-12-09 00:00:00 | admin | create |