This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Accepted as a DR at the November, 2022 meeting.]
The example intends to illustrate that a class type cannot be the type of a non-type template parameter (although the example is still ill-formed because "T()" is interpreted as a function type).
Proposed resolution (approved by CWG 2022-11-08):
Change in 13.10.3.1 [temp.deduct.general] bullet 11.8 as follows:
template <class T, T> struct S {}; template <class T> int f(S<T,-- end example ]T()T{}>*); // #1 class X { int m; }; int i0 = f<X>(0); // #1 uses a value of non-structural type X as a non-type template argument