c++ - one more template function overload resolution bug
-
Christof Meerwald
(24/24)
Aug 11 2002
template
template<class T>
int f(T, void *)
{
return 0;
}
template<class T>
int f(T, const T *)
{
return 1;
}
int main()
{
char c;
unsigned long *b = 0;
return f(c, b);
// Error: need explicit cast for function parameter 2 to get
// from: unsigned long *
// to : char const *
}
bye, Christof
--
http://cmeerw.org JID: cmeerw jabber.at
mailto cmeerw at web.de
...and what have you contributed to the Net?
Aug 11 2002








Christof Meerwald <cmeerw web.de>