typedef int int_type; //OK
typedef A A_type; //OK
typedef A::B B_type; //error, the compiler doesn't 'B' is a type or something else.
typedef typename _Mybase::value_type value_type; // 红色部分先声明这是一个类型,然后再做类型定义。
typedef int int_type; //OK
typedef A A_type; //OK
typedef A::B B_type; //error, the compiler doesn't 'B' is a type or something else.
typedef typename _Mybase::value_type value_type; // 红色部分先声明这是一个类型,然后再做类型定义。
转载于:https://www.cnblogs.com/OnTheRoad2016/p/6928815.html