It is right. The typedef name cannot be used in such a direct declaration (this is technically called a specified type specifier, and if such a qualifier resolves the typedef name, the program is poorly formed).
I donโt understand why you first need an advanced declaration. Because if you already have a typedef, why not just use this typedef? It also means this class.
Change From your comment, it seems that you need the assigned header of the header declaration, pretty much in the same sense <iosfwd> . So, if your template is called Test_Template_Name_Long , this header might look like
Testfwd.h
template<typename A, typename B> class Test_Template_Name_Long; typedef Test_Template_Name_Long<int, bool> Test1;
Then you can simply use this heading instead of making class Test1 , which the compiler has no idea what it is (and will think that it is a new class, regardless of any template and typedef).
Johannes Schaub - litb
source share