I'm doing some policy-based designs here and I have the need to typedef lots of template types to shorten the names.
Now the problem comes that when I need to use a pointer to one of those types I try to just forward-declare it but the compiler complains with a test.cpp:8: error: using typedef-name ‘Test1’ after ‘class’
It's nothing to do with sizes as I don't need the obj at all, its just a pointer in a ".h" file where I don't want to bring the whole template in.
This is g++:
//Works
class Test{};
class Test;
//Doesn't work
class Test{};
typedef Test Test1;
class Test1;
Any hint?