clang++ - treat template class name as template in the class scope
问题 It seems that clang++ (I tried clang 3.2) treats the name of a template class as a instantiated class, not a template for any occurence within the class scope. For example, the following codes template <template <class> class T> class A {}; template <typename T> class B { A<B> member; // ^---- clang++ treats B as an instantiated class // but I want it to be a template here // this code could compile in g++ }; int main() { B<int> b; return 0; } What should I do to compile that? 回答1: C++03