This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2023-02-07


1991. Inheriting constructors vs default arguments

Section: _N4527_.12.9  [class.inhctor]     Status: CD4     Submitter: Hubert Tong     Date: 2014-08-27

[Adopted at the October, 2015 meeting as P0136R1.]

The creation of inheriting constructors does not, but should, consider the default arguments of constructors in the inheriting class. For example,

  struct A {
    A(int, int);
  };

  struct B : A {
    using A::A;
    B(int, int, int = 0); // does not suppress creation of B(int, int) from A(int, int)
  };