Created on 2000-01-28.00:00:00 last changed 298 months ago
Rationale (04/00):
This issue is covered in a more general context in issue 214.
The description of how the partial ordering of template functions is determined in 13.7.7.3 [temp.func.order] paragraphs 3-5 does not make any provision for nondeduced template parameters. For example, the function call in the following code is ambiguous, even though one template is "obviously" more specialized than the other:
template <class T> T f(int); template <class T, class U> T f(U); void g() { f<int>(1); }The reason is that neither function parameter list allows template parameter T to be deduced; both deductions fail, so neither template is considered more specialized than the other and the function call is ambiguous.
One possibility of addressing this situation would be to incorporate explicit template arguments from the call in the argument deduction using the transformed function parameter lists. In this case, that would result in finding the first template to be more specialized than the second.
History | |||
---|---|---|---|
Date | User | Action | Args |
2000-05-21 00:00:00 | admin | set | messages: + msg376 |
2000-05-21 00:00:00 | admin | set | status: open -> dup |
2000-01-28 00:00:00 | admin | create |