https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118626

--- Comment #9 from Patrick Palka <ppalka at gcc dot gnu.org> ---
A valid reduced testcase:

template<long> struct _Nth_type;

template<class _Up>
struct variant {
  template<class _Tp> static constexpr long __accepted_index = 0;
  template<long _Np> using __to_type = _Nth_type<_Np>;
  template<class _Tp> using __accepted_type = __to_type<__accepted_index<_Tp>>;
  template<class = __accepted_type<_Up>> variant(_Up);
};

template<class _Tp>
struct Node { Node(_Tp); };

template<class R> using Tree = variant<Node<R>>;
using type = decltype(Tree{Node{42}});
using type = Tree<int>;

Reply via email to