Created on 2016-06-23.00:00:00 last changed 48 months ago
[Voted into the WP at the July, 2017 meeting.]
Proposed resolution (May, 2017):
This issue is resolved by the resolution of issue 2273.
In an example like:
struct A { A(int, int = 0); void f(int, int = 0); }; struct B : A { B(int); using A::A; void f(int); using A::f; }
calls to B(int) and B::f(int) are ambiguous, because they could equally call the version inherited from the base class. This doesn't match the intent in 9.9 [namespace.udecl], which usually makes derived-class functions take precedence over ones from a base class.
The above patterns are not common, although they sometimes cause breakage when refactoring a base class. However, P0136R1 brings this into sharp focus, because it causes the rejection of the following formerly-valid and very reasonable code:
struct A { A(int = 0); }; struct B : A { using B::B; }; B b;
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-12-15 00:00:00 | admin | set | status: drwp -> cd5 |
2018-02-27 00:00:00 | admin | set | messages: + msg6147 |
2018-02-27 00:00:00 | admin | set | messages: + msg6146 |
2018-02-27 00:00:00 | admin | set | status: open -> drwp |
2016-06-23 00:00:00 | admin | create |