template <typename TYPE> class List
{
public:
class Node
{
TYPE object;
};
};
template <typename TYPE> class ResourceManager
{
public:
typedef List<TYPE> ResourceList;
void DoSomething()
{
ResourceList::Node node; // Here's where I get the error.
}
};
GCC compiler doesn't like this, what am I doing wrong?
Here's an extremely simplified example of some code from my multi-platform game engine.
This isn't new code, and I've compiled it many times before (using both Visual Studio and Codewarrior) without any problems. Now I'm trying to compile it for the IPhone (which uses the gcc compiler), and I get this error:
ResourceList::Node node; - expected `;' before 'node'
I'm assuming this relates to a c++ standard that hasn't been properly supported by the other compilers, but can anybody suggest what I might be doing wrong, and how I might fix it.
Thanks in advance.
Dependent qualified typenames need to be prefixed by the typename keyword. Ex:
typename ResourceList::Node node;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement