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


3227. IFNDR for always-empty packs

Section: 13.8.1  [temp.res.general]     Status: tentatively ready     Submitter: Jay Ghiron     Date: 2026-03-31

(From submission #878.)

The phrasing in 13.8.1 [temp.res.general] bullet 6.6 is not parallel to similar phrasings in bullets 1-3:

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

For example, this bullet is vacuously true (but unintentionally so) if there is no valid specialization at all.

Also, a similar rule for empty structured binding packs is missing, although the example in 9.7 [dcl.struct.bind] paragraph 3 appears to indicate support for these. However, consider:

  int f(auto x) {
    auto [...y] = x;
    union U : decltype(y)... {}; // unions cannot have base classes
    return 0;
  }

  struct S {};
  int z = f(S());

This might be addressed by 13.7.4 [temp.variadic] paragraph 7, though, together with the existing rule about valid specializations for the function template f.

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

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

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