Created on 2012-10-10.00:00:00 last changed 122 months ago
[Moved to DR at the September, 2013 meeting.]
Proposed resolution (April, 2013):
Change _N4527_.12.9 [class.inhctor] paragraph 3 as follows:
For each non-template constructor in the candidate set of inherited constructors other than a constructor having no parameters or a copy/move constructor having a single parameter, a constructor is implicitly declared with the same constructor characteristics unless there is a user-declared constructor with the same signature in the class where the using-declaration appears or the constructor would be a default, copy, or move constructor for that class.
According to _N4527_.12.9 [class.inhctor] paragraph 3,
For each non-template constructor in the candidate set of inherited constructors other than a constructor having no parameters or a copy/move constructor having a single parameter, a constructor is implicitly declared with the same constructor characteristics unless there is a user-declared constructor with the same signature in the class where the using-declaration appears.
It seems that this should be suppressing constructors that would be copy/move constructors in the derived class rather than copy/move constructors in the base class. For example:
struct B; struct A { A(const A&); A(const B&); A(int); }; struct B: A { using A::A; };
If B::B(const B&) is an inheriting constructor, other subobjects of B will not be copied. Also, if A::A(const A&) is not inherited, B objects cannot be constructed from an A object.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-11-24 00:00:00 | admin | set | status: drwp -> c++14 |
2014-03-03 00:00:00 | admin | set | status: dr -> drwp |
2013-10-14 00:00:00 | admin | set | messages: + msg4696 |
2013-10-14 00:00:00 | admin | set | status: ready -> dr |
2013-05-03 00:00:00 | admin | set | status: review -> ready |
2012-11-03 00:00:00 | admin | set | messages: + msg4087 |
2012-10-10 00:00:00 | admin | create |