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 at the November, 2020 meeting.]
Given the following example,
template <typename T> struct A {}; template <typename T> void f() requires (sizeof(A<T>)) {}
the current wording does not appear to allow diagnosis of the program as ill-formed. In particular, 13.8 [temp.res] bullet 8.2 says,
The program is ill-formed, no diagnostic required, if:
...
no substitution of template arguments into a type-constraint or requires-clause would result in a valid expression, or
...
However, substitution into the requires-clause in this case would result in a valid expression, but not one that is an atomic constraint that can be checked for satisfaction.
Proposed resolution (April, 2020):
Change bullet 8.2 of 13.8 [temp.res] as follows:
The program is ill-formed, no diagnostic required, if:
...
no substitution of template arguments into a type-constraint or requires-clause would result in a valid expressionany constraint-expression in the program, introduced or otherwise, has (in its normal form) an atomic constraint A where no satisfaction check of A could be well-formed and no satisfaction check of A is performed, or...