June 09, 2003 illegal cast (template function with default parameter) | ||||
---|---|---|---|---|
| ||||
template<class T>
void f(const T = T(0))
// Error: illegal cast
// from: int
// to : T
{ }
int main()
{
f(0);
f<int>();
}
Extracted from Boost's format library.
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