// PR c++/104470 // { dg-do compile { target c++20 } } template class variant { template static constexpr int __accepted_index = 0; template using __to_type = int; template using __accepted_type = __to_type<__accepted_index<_Tp>>; template> variant(_Tp __t) { } }; template struct Foo { T value; }; template using V = variant>; V e = Foo{1}; // { dg-error "" }