Created on 2015-03-05.00:00:00 last changed 95 months ago
Proposed resolution (March, 2016):
Change 13.10.3.6 [temp.deduct.type] paragraph 17 as follows:
If P has a form that contains <i>, and if the type ofthe corresponding value of A differs from the type ofi differs from the type of the corresponding template parameter of the template named by the enclosing simple-template-id, deduction fails. If P has a form that contains [i]...
[Adopted at the June, 2016 meeting.]
According to 13.10.3.6 [temp.deduct.type] paragraph 17,
If P has a form that contains <i>, and if the type of the corresponding value of A differs from the type of i, deduction fails.
This gives the wrong result for an example like:
template<int &> struct X; template<int &N> void f(X<N>&); int n; void g(X<n> &x) { f(x); }
Here, P is X<N>, which contains <i>. The type of i is int&. The corresponding value from A is n, which is a glvalue of type int. Presumably this should be valid.
I think this rule means to say something like,
If P has a form that contains <i>, and the type of i differs from the type of the corresponding template parameter of the template named by the enclosing simple-template-id, deduction fails.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | messages: + msg6108 |
2017-02-06 00:00:00 | admin | set | status: open -> cd4 |
2015-03-05 00:00:00 | admin | create |