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 #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
- ...
- every valid specialization of a variadic template requires an empty template parameter pack, or
- ...
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
- ...
everythere exists a template parameter pack P of a variadic template TT such that no valid specializationof, ignoring static_assert-declarations that fail, can be generated for TTa variadic template requires an empty template parameter packwhen P is non-empty, or- ...