是否可以在类层次结构中获取基类类型?
例如:
struct A{};
struct B{} : public A;
struct C{} : public B;
Run Code Online (Sandbox Code Playgroud)
我想要一些typedef Base<T>::Type内部像这样的模板:
Base<A>::Type == A
Base<B>::Type == A
Base<C>::Type == A
Run Code Online (Sandbox Code Playgroud)
这可能吗?我有多重继承的情况怎么样?