http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53822
Bug #: 53822
Summary: Diagnostic: spell out type in ambiguous call
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Hello,
void f(float);
void f(double);
int main(){
typedef unsigned NT;
NT i=3;
f(i);
}
mp.cc: In function ‘int main()’:
mp.cc:6:6: error: call of overloaded ‘f(NT&)’ is ambiguous
mp.cc:6:6: note: candidates are:
mp.cc:1:6: note: void f(float)
mp.cc:2:6: note: void f(double)
Notice that the error message never mentions "unsigned". In the middle of some
deep templated code, finding out what the problematic NT is can be hard.