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

2026-09-11


3226. Conflict of templated entity vs. enclosing template

Section: 13.8.1  [temp.res.general]     Status: tentatively ready     Submitter: Egor Mikhailov     Date: 2026-08-12

(From submission #973.)

Consider:

  template <typename T>
  struct Foo
  {
    Foo() {}
    Foo(T) {
      this->bar(); // IFNDR here?
    }
  };

  Foo<int> f;

This ought to be IFNDR, but the enclosing template is, in fact, instantiated. However, the definition of Foo(T) is not instantiated.

Proposed resolution (approved by CWG 2026-09-01):

Change in 13.8.1 [temp.res.general] bullet 6.1 as follows:

The program is ill-formed, no diagnostic required, if