Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
'identifier' : cannot deduce type argument as function argument is ambiguous
Remarks
The compiler cannot determine which overloaded functions to use for a generic or template argument.
Examples
The following example generates C2914:
// C2914.cpp
// compile with: /c
void f(int);
void f(double);
template<class T> void g(void (*) (T));
void h() { g(f); } // C2914
// try the following line instead
// void h() { g<int>(f); }
C2914 can also occur when using generics. The following example generates C2914:
// C2914b.cpp
// compile with: /clr /c
void f(int);
void f(double);
template<class T>
void gf(void (*) (T));
void h() { gf(f);} // C2914
// try the following line instead
void h() { gf<int>(f); }