Created on 2020-04-20.00:00:00 last changed 28 months ago
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...
[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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-08-19 07:54:33 | admin | set | status: drwp -> cd6 |
2021-02-24 00:00:00 | admin | set | status: dr -> drwp |
2020-12-15 00:00:00 | admin | set | messages: + msg6330 |
2020-04-20 00:00:00 | admin | create |