https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81862
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Reduced. But the PR86917 is much simpler, so I'd start with fixing that one. template <unsigned long...> struct b; template <typename, typename> struct g; template <unsigned long... c, unsigned long... d> struct g<b<c...>, b<d...>> { using e = b<c..., d...>; }; template <int f> struct i : g<typename i<f / 2>::e, typename i<f - f / 2>::e> {}; template <> struct i<1> { typedef b<0> e; }; template <typename h, h...> struct j {}; template <typename h, h f, typename = typename i<f>::e> struct o; template <typename h, h f, unsigned long... k> struct o<h, f, b<k...>> { typedef j<h, k...> e; }; template <typename h, h f> using l = typename o<h, f>::e; template <long... k> using m = j<unsigned long, k...>; template <long f> using n = l<unsigned long, f>; struct q { constexpr q(int) { } }; template <int p> struct G { typedef q r[p]; }; template <int p> struct H { typename G<p>::r s; q operator[](long); }; template <typename... t> class I { public: constexpr I(t... v) : I(v..., n<5>{}) {} template <unsigned long... w> constexpr I(t... v, m<w...> x) : u({y(v..., x)[w]...}) {} template <unsigned long... w> auto y(t..., m<w...>) { H<5> a{w...}; return a; } q u[5]; }; int main() { I<int, bool> c(2, false); }