This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


1738. Explicit instantiation/specialization of inheriting constructor templates

Section: _N4527_.12.9  [class.inhctor]     Status: C++14     Submitter: Daveed Vandevoorde     Date: 2013-08-16

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

It is not clear whether it is permitted to explicitly instantiate or explicitly specialize specializations of inheriting constructor templates. Since inheriting constructors are considered to be implicitly declared (_N4527_.12.9 [class.inhctor] paragraph 1), it might be inferred that 13.9.3 [temp.explicit] paragraph 4 forbids their explicit instantiation:

If the declaration of the explicit instantiation names an implicitly-declared special member function ( 11.4.4 [special]), the program is ill-formed.

Similarly, an explicit specialization provides a definition for the specialized member, and 11.4.4 [special] paragraph 1 forbids defining an implicitly-declared special member function.

These inferences do not seem conclusive, however, so an explicit statement in _N4527_.12.9 [class.inhctor] would be helpful.

(See also issue 1780.)

Proposed resolution (January, 2014):

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

A constructor so declared has the same access as the corresponding constructor in X. It is deleted if the corresponding constructor in X is deleted (9.5 [dcl.fct.def]). An inheriting constructor shall not be explicitly instantiated (13.9.3 [temp.explicit]) or explicitly specialized (13.9.4 [temp.expl.spec]).