August 11, 2002 one more template function overload resolution bug | ||||
---|---|---|---|---|
| ||||
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?
|
Copyright © 1999-2021 by the D Language Foundation