Nested class of class template can be “incomplete”
问题 I'm at a loss as to how to explain why it is valid to create the member inner in the class template OuterTempl<T> whereas it is illegal to do so in the untemplated class Outer . // Non-template version struct Outer { struct Inner; Inner inner; // incomplete type (I get this) }; struct Outer::Inner { }; // Template version template<typename T> struct OuterTempl { struct InnerTempl; InnerTempl inner; // OK ... Huh!? }; template<typename T> struct OuterTempl<T>::InnerTempl { }; int main() { }