Created on 2014-06-12.00:00:00 last changed 49 months ago
[Adopted at the October, 2015 meeting as P0136R1.]
Default arguments are a common mechanism for applying SFINAE to constructors. However, default arguments are not carried over when base class constructors are inherited; instead, an overload set of constructors with various numbers of arguments is created in the derived class. This seems problematic.
One possibility would be to change the mechanism for how constructors are inherited; a using-declaration might actually introduce the base class constructors into the derived class, as other using-declarations do, and if a base class constructor were selected, the remaining derived class members would be default-initialized.
This approach would also address issues 1645, as duplicated constructors would simply fail during overload resolution, and 1715, since there would be no synthesized constructors for which access checking would be needed.
The effect of such an approach on ABIs, including mangling, would need to be considered.
See also issue 1959.
|2017-02-06 00:00:00||admin||set||status: dr -> cd4|
|2015-11-10 00:00:00||admin||set||status: drafting -> dr|