This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Template problems
- From: "Andrew McPherson" <andrew dot mcpherson at gmail dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Jun 2008 16:06:07 -0700
- Subject: Template problems
The following code causes this gcc error:
test.c: In member function `void Test2<TAnotherClass>::Initialize()':
test.c:22: error: expected primary-expression before '>' token
test.c:22: error: expected primary-expression before ')' token
template <class TSomeClass>
class Test1
{
public:
template <class TOtherClass>
void TestMe()
{
}
};
struct Nothing2
{
};
template <class TAnotherClass>
class Test2
{
public:
void Initialize()
{
mTest.TestMe<Nothing2>();
}
Test1<TAnotherClass> mTest;
};
struct Nothing
{
};
void TestFunc()
{
Test2<Nothing> as;
as.Initialize();
}