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

2024-10-26


1573. Inherited constructor characteristics

Section: _N4527_.12.9  [class.inhctor]     Status: CD4     Submitter: Jason Merrill     Date: 2012-10-15

[Moved to DR at the November, 2014 meeting.]

Issue 1350 clarified that the exception-specification for an inheriting constructor is determined like defaulted functions, but we should also say something similar for deleted, and perhaps constexpr.

Also, the description of the semantics of inheriting constructors don't seem to allow for C-style variadic functions, so the text should be clearer that such constructors are only inherited without their ellipsis.

Proposed resolution (February, 2014):

  1. Change _N4527_.12.9 [class.inhctor] paragraph 1 as follows:

  2. A using-declaration (9.9 [namespace.udecl]) that names a constructor implicitly declares a set of inheriting constructors. The candidate set of inherited constructors from the class X named in the using-declaration consists of actual constructors and notional constructors that result from the transformation of defaulted parameters and ellipsis parameter specifications as follows:

  3. Change _N4527_.12.9 [class.inhctor] paragraph 2 as follows:

  4. The constructor characteristics of a constructor or constructor template are

  5. Change _N4527_.12.9 [class.inhctor] paragraph 4 as follows:

  6. A constructor so declared has the same access as the corresponding constructor in X. It is constexpr if the user-written constructor (see below) would satisfy the requirements of a constexpr constructor (9.2.6 [dcl.constexpr]). It is deleted if the corresponding constructor in X is deleted (9.5 [dcl.fct.def] 9.5.3 [dcl.fct.def.delete]) or if a defaulted default constructor (11.4.5 [class.ctor]) would be deleted, except that the construction of the direct base class X is not considered in the determination. An inheriting constructor shall not be explicitly instantiated (13.9.3 [temp.explicit]) or explicitly specialized (13.9.4 [temp.expl.spec]).