Created on 2013-09-23.00:00:00 last changed 136 months ago
Notes from the September, 2013 meeting:
CWG agreed that this example should not be accepted. The existing rules seem to cover this case (deduction is not specified to “succeed,” so it's a reasonable conclusion that it fails), but it might be helpful to be clearer.
It is not clear how an example like the following is to be handled:
template <typename U> struct A { template <typename V> operator A<V>(); }; template <typename T> void foo(A<void (T)>); void foo(); int main() { A<void (int, char)> a; foo<int>(a); foo(a); // deduces T to be int }
In sub13.10.3.6 [temp.deduct.type] paragraph 10, deduction from a function type considers P/A pairs from the parameter-type-list only where the "P" function type has a parameter. Deduction is not specified to fail if there are additional parameters in the corresponding "A" function type.
History | |||
---|---|---|---|
Date | User | Action | Args |
2013-10-14 00:00:00 | admin | set | messages: + msg4671 |
2013-09-23 00:00:00 | admin | create |