C
claudiu
Hi,
I run into a bit of trouble trying to compile the code below.
template<typename T>
struct Out
{
struct In{};
};
template<typename T>
void use(const typename Out<T>::In& r){}
void test()
{
use(Out<int>::In());
}
Using Comeau compiler I get the error:
line 13: error: no instance of function template "use" matches the
argument list
The argument types that you used are: (Out<int>::In)
use(Out<int>::In());
^
It looks like the template function use cannot deduce the argument
type but I can't understand why. Maybe someone out there can shed some
light on this?
Many thanks,
Claudiu
I run into a bit of trouble trying to compile the code below.
template<typename T>
struct Out
{
struct In{};
};
template<typename T>
void use(const typename Out<T>::In& r){}
void test()
{
use(Out<int>::In());
}
Using Comeau compiler I get the error:
line 13: error: no instance of function template "use" matches the
argument list
The argument types that you used are: (Out<int>::In)
use(Out<int>::In());
^
It looks like the template function use cannot deduce the argument
type but I can't understand why. Maybe someone out there can shed some
light on this?
Many thanks,
Claudiu