In a dummy example of a class
typedef myStruct>> mv;
int is the innermost
Try the following. It also returns a tuple if the template has more than one element:
#include
#include
template
struct innermost_impl
{
using type = T;
};
template class E, typename T>
struct innermost_impl>
{
using type = typename innermost_impl::type;
};
template class E, typename... Ts>
struct innermost_impl>
{
using type = std::tuple::type...>;
};
template
using innermost = typename innermost_impl::type;
template
struct X;
static_assert(std::is_same>>>, int>::value, "");
int main()
{
}