// PR c++/83918 // { dg-do compile { target c++17 } } constexpr unsigned foo (unsigned x, unsigned y) { return x > y ? x : y; } template struct A; template struct B; template struct A , B > { enum : unsigned { u = foo (sizeof (S), sizeof (U)), v = A , B >::w, w = foo (u, v) }; }; template <> struct A , B <>> { enum : unsigned { w = 0 }; }; constexpr static const auto v { A , B <9,8,7,6,5,4,3,2,1>>::w }; static_assert (v == sizeof (int));