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
(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
- no valid specialization, ignoring static_assert-declarations that fail (9.1 [dcl.pre]), can be generated for a templated entity or a substatement of a constexpr if statement (8.5.2 [stmt.if]) within a templated entity and
the innermost enclosing templatethat templated entity or substatement is not instantiated, or- ...