template and nested class problem
From: Miroslav Novak (miroslav.novak_at_is.cz)
Date: 10/31/03
- Next message: trustron: "Simple Pointer Question"
- Previous message: Brian: "Re: function objects instead of function pointers?"
- Next in thread: Gianni Mariani: "Re: template and nested class problem"
- Reply: Gianni Mariani: "Re: template and nested class problem"
- Reply: Fraser Ross: "Re: template and nested class problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 14:51:17 +0100
Hi,
I can't compile the following code. Does anyone know where is the problem?
Thank you in advance,
Mirek.
code:
----------------
template<class T>
struct CA
{
struct CB
{
T* z;
};
};
template<class T>
void fun(typename CA<T>::CB x) {}; // line 56
void test()
{
CA<int>::CB x;
fun(x); // line 61
}
errors:
------------
test.cpp(61) : error C2783: 'void fun(CA<T>::CB)' : could not deduce
template argument for 'T'
test.cpp(56) : see declaration of 'fun'
- Next message: trustron: "Simple Pointer Question"
- Previous message: Brian: "Re: function objects instead of function pointers?"
- Next in thread: Gianni Mariani: "Re: template and nested class problem"
- Reply: Gianni Mariani: "Re: template and nested class problem"
- Reply: Fraser Ross: "Re: template and nested class problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|