https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92654
--- Comment #7 from fiesh at zefix dot tv --- And creduce just finished: (I left the ifdef unchanged so it can still be compiled under clang.) #ifdef __has_builtin #define a 1 #endif template <typename b, b c> struct d { typedef b e; constexpr operator e() const { return c; } }; template <typename> using g = int; template <typename b, b...> struct h {}; template <typename b, b aa> using i #if a = __make_integer_seq<h, b, a> #else = h<b, __integer_pack(aa)...> #endif ; template <typename j, typename ac, ac... ad> void ae(j f, h<ac, ad...>) { (f(d<ac, ad>{}), ...); } template <auto k, typename j> void af(j f) { using ac = g<decltype(k)>; using l = i<ac, k>; ae(f, l{}); } template <typename m, m n> using o = d<m, n>; template <typename ag, typename j> struct t { j f; template <typename u> void operator()(u) { f(o<ag, ag(0)>{}); } }; template <typename ag, typename j> void ai(j f) { auto aj = t<ag, j>{f}; af<p(ag{})>(aj); } enum q {}; constexpr int p(q) { return 2; } enum r { s }; template <q, unsigned long> struct C; template <r> int ak(int const &); template <template <q, unsigned long, q, unsigned long> typename, template <q, unsigned long> typename al> void am() { ai<q>([](auto an) { auto ao = decltype(an)(); [ao](auto ad) { using u = decltype(ad); if constexpr (al<ao, u{}>::ap) ; }; }); } template <q, unsigned long, q, unsigned long> struct D; template <> int ak<s>(int const &) { am<D, C>; }