// PR c++/97246 // { dg-do compile { target c++20 } } template T arg_T(decltype(Is)..., T, ...); template inline constexpr auto get = [](decltype(Is)..., T... v, ...) { static_assert( sizeof...(T) == sizeof...(v) ); if constexpr ( sizeof...(T) == 1 ) return (v,...); else { using V = decltype(arg_T<__integer_pack(I)...>(v...)); return get.template operator()(v...); } }; static_assert( get<0>('\0', short{1}, 2, long{3}) == 0 );