Created on 2016-08-15.00:00:00 last changed 48 months ago
Proposed resolution (August, 2017):
Change 11.4.5.3 [class.copy.ctor] paragraph 10 as follows:
An implicitly-declared copy/move constructor is an inline public member of its class. A defaulted copy/move constructor for a class X is defined as deleted (9.5.3 [dcl.fct.def.delete]) if X has:
a variant member with a non-trivial corresponding constructor and X is a union-like class,a potentially constructed subobject type M (or array thereof) that cannot be copied/moved because overload resolution (12.2 [over.match]), as applied to find M's corresponding constructor, results in an ambiguity or a function that is deleted or inaccessible from the defaulted constructor,
a variant member whose corresponding constructor as selected by overload resolution is non-trivial,
any potentially constructed subobject of a type with a destructor that is deleted or inaccessible from the defaulted constructor, or,
for the copy constructor, a non-static data member of rvalue reference type.
[Accepted as a DR at the November, 2017 meeting.]
According to 11.4.5.3 [class.copy.ctor] bullet 10.1,
A defaulted copy/move constructor for a class X is defined as deleted (9.5.3 [dcl.fct.def.delete]) if X has:
a variant member with a non-trivial corresponding constructor and X is a union-like class,
However, it is not clear from this specification how to handle an example like:
struct A { A(); A(const A&); }; union B { A a; };
since there is no corresponding special member in A.
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-12-15 00:00:00 | admin | set | status: dr -> cd5 |
2018-02-27 00:00:00 | admin | set | messages: + msg6118 |
2016-08-15 00:00:00 | admin | create |