template<typename T>
struct A {
typename T::Sub s;
};
struct B : A<B> {
struct Sub {};
};
Clang 正在报告此错误:
todo.cc:3:15: error: no type named 'Sub' in 'B'
typename T::Sub s;
~~~~~~~~~~~~^~~
todo.cc:6:12: note: in instantiation of template class 'A<B>' requested here
struct B : A<B> {
^
我怎样才能让它工作?