Created on 2009-07-01.00:00:00 last changed 178 months ago
[Voted into WP at March, 2010 meeting.]
Proposed resolution (October, 2009):
Change 11.4.5 [class.ctor] paragraph 5, the second list, as follows:
An implicitly-declared default constructor for class X is defined as deleted if:
X is a union-like class that has a variant member with a non-trivial default constructor,
any non-static data member with no brace-or-equal-initializer is of reference type,
any non-static data member of const-qualified type (or array thereof) with no brace-or-equal-initializer does not have a user-provided default constructor, or
any direct or virtual base class, or non-static data member with no brace-or-qual-initializer,
or direct or virtual base classhas class type M (or array thereof) and either M has no defaultconstructor, or ifconstructor or overload resolution (12.2 [over.match]) as applied to M's default constructor,results in an ambiguity or in a function that is deleted or inaccessible from the implicitly-declared default constructor.
(From message 14555.)
The reasons for which an implicitly-declared default constructor is defined as deleted, given in 11.4.5 [class.ctor] paragraph 4, all deal with cases in which a member cannot be default-initialized. Presumably a brace-or-equal-initializer for such a member would eliminate the need to define the constructor as deleted, but this case is not addressed by the current wording.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | messages: + msg2718 |
2010-03-29 00:00:00 | admin | set | status: ready -> cd2 |
2009-11-08 00:00:00 | admin | set | messages: + msg2365 |
2009-11-08 00:00:00 | admin | set | status: open -> ready |
2009-07-01 00:00:00 | admin | create |