G
Gary li
Hi, all
I find "template template" class cann't been compiled in VC6 but can ok
in Redhat9. I write a test program like as:
template< template<class> class T>
class A
{
};
int main()
{
return 0;
}
compiling failed for message:
D:\my_projects\testcpp\main.cpp(3) : error C2954: template definitions
cannot nest
D:\my_projects\testcpp\main.cpp(3) : error C2951: template declarations
are only permitted at global or namespace scope
D:\my_projects\testcpp\main.cpp(3) : error C2226: syntax error :
unexpected type 'T'
D:\my_projects\testcpp\main.cpp(5) : error C2143: syntax error :
missing '>' before '{'
D:\my_projects\testcpp\main.cpp(6) : error C2059: syntax error : '<end
Parse>'
Who can explain the reason to me. Thanks very much.
I find "template template" class cann't been compiled in VC6 but can ok
in Redhat9. I write a test program like as:
template< template<class> class T>
class A
{
};
int main()
{
return 0;
}
compiling failed for message:
D:\my_projects\testcpp\main.cpp(3) : error C2954: template definitions
cannot nest
D:\my_projects\testcpp\main.cpp(3) : error C2951: template declarations
are only permitted at global or namespace scope
D:\my_projects\testcpp\main.cpp(3) : error C2226: syntax error :
unexpected type 'T'
D:\my_projects\testcpp\main.cpp(5) : error C2143: syntax error :
missing '>' before '{'
D:\my_projects\testcpp\main.cpp(6) : error C2059: syntax error : '<end
Parse>'
Who can explain the reason to me. Thanks very much.