Created on 2013-07-31.00:00:00 last changed 27 months ago
Proposed resolution (August, 2021):
Change 13.10.3.1 [temp.deduct.general] paragraph 8 as follows:
If a substitution results in an invalid type or expression, type deduction fails. An invalid type or expression is one that would be ill-formed, with a diagnostic required, if written in the same context using the substituted arguments.
[Accepted as a DR at the October, 2021 meeting.]
According to 13.10.3 [temp.deduct] paragraph 8,
If a substitution results in an invalid type or expression, type deduction fails. An invalid type or expression is one that would be ill-formed, with a diagnostic required, if written using the substituted arguments.
Presumably the phrase “if written” refers to rewriting the template declaration in situ with the substituted arguments, rather than writing that type or expression at some arbitrary location, e.g.,
void g(double) = delete; template<class T> auto f(T t) -> decltype(g(t)); void g(int); void h() { typedef int T; T t = 42; g(t); // Ok (I “wrote the substituted arguments”, and it seems fine) f(42); // Presumably substitution is meant to fail. }
Perhaps a clearer formulation could be used?
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-08-19 07:54:33 | admin | set | status: drwp -> cd6 |
2022-02-15 00:00:00 | admin | set | status: dr -> drwp |
2021-11-15 00:00:00 | admin | set | messages: + msg6580 |
2021-11-15 00:00:00 | admin | set | status: drafting -> dr |
2013-10-14 00:00:00 | admin | set | status: open -> drafting |
2013-07-31 00:00:00 | admin | create |