January 07, 2003 Template argument deduction | ||||
---|---|---|---|---|
| ||||
template<class T>
void f(const T * const *c)
{ }
int main()
{
char **c;
f(c);
// Error: no match for function 'f(char **)'
}
See 14.8.2.1 Deducing template arguments from a function call [temp.deduct.call], paragraph 3.
Workaround is to explicitely add the consts to the function argument.
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