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


1736. Inheriting constructor templates in a local class

Section: _N4527_.12.9  [class.inhctor]     Status: CD4     Submitter: Daveed Vandevoorde     Date: 2013-08-13

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

A local class cannot, according to 13.7.3 [temp.mem] paragraph 2, have member templates. Presumably, then, an example like the following is ill-formed:

  struct S {
    template<class T> S(T) {
      struct L: S {
        using S::S;
      };
    }
  };

It is accepted by current implementations, however. Does something need to be said about this case in _N4527_.12.9 [class.inhctor], either to explicitly allow or forbid it, or is the restriction in 13.7.3 [temp.mem] sufficient?