c++ - Template argument deduction
-
Christof Meerwald
(17/17)
Jan 07 2003
template
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?
Jan 07 2003








Christof Meerwald <cmeerw web.de>