#include <tuple>


template<template<typename...> class T, typename>
struct instantiate_with_arg_pack { };

template< template<typename...> class T
        , template<typename...> class U
        , typename... Ts>
struct instantiate_with_arg_pack<T, U<Ts...>>
{
    using type = T<Ts...>;
};

template<class T>
using to_tuple = typename instantiate_with_arg_pack<std::tuple, T>::type;


template<typename T = int, typename U = double> struct exampl {};


template<typename T> struct TD;


int main()
{
    using Tuple = to_tuple<exampl<>>;
    TD< exampl<std::tuple_element_t<1, Tuple>, std::tuple_element_t<0, Tuple>> > td; // should swap default template parameters
}