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

--- Comment #1 from fiesh at zefix dot tv ---
Ran through creduce:

template <int a> struct b { static constexpr int c = a; };
template <typename, unsigned long> struct d {};
template <typename> struct j;
template <typename e, unsigned long g> struct j<d<e, g>> : b<g> {};
template <typename e> constexpr long h = j<e>::c;
template <int i> struct n : n<i - 1> { static constexpr int c = i; };
template <> struct n<0> {};
using k = n<6>;
#ifndef FIX
template <typename = void>
#endif
struct l {
  d<int, 0> m;
  static auto f(n<h<decltype(m)>>) -> d<int, 1>;
  static auto f(n<h<decltype(f(k{}))> + 1> q) -> d<int, decltype(q)::c> {
    static_assert(q.c == 2, "BUG88242_1");
  }
  static auto o() { f(k{}); }
};
#ifndef FIX
using p = l<>;
#else
using p = l;
#endif
static_assert(p::o);

Reply via email to