Consider the following code:
template <class...> struct base {};
template <class... T> struct intermediate: base<void, T...> {};
template <class... T> struct derived: base<T...>, intermediate<T...> {};
using type1 = derived<int>::intermediate::base; // works
using type2 = derived<int>::base; // ambiguous
Would there be a way to make it work without ambiguity so that derived<int>::base
means the most "direct" base class in the hierarchy (in this example base<int>
). Template metaprogramming is welcomed.