S
Stefan Slapeta
VC 2003 calls f(char const*) for the following code, but it should call
the function template as f(char const*) is no perfect match (because of
decay).
Please could someone analyze the behaviour in VC .2005?
Thanks, Stefan
template <typename T>
void f(T const&)
{
// this one should be called!
}
void f(const char *)
{
}
int main()
{
char buf[] = "abc";
f(buf);
}
the function template as f(char const*) is no perfect match (because of
decay).
Please could someone analyze the behaviour in VC .2005?
Thanks, Stefan
template <typename T>
void f(T const&)
{
// this one should be called!
}
void f(const char *)
{
}
int main()
{
char buf[] = "abc";
f(buf);
}