[Bug c++/94489] ICE: unexpected expression ‘std::min’ of kind overload

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 6 23:19:44 GMT 2020


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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Likely still invalid, but it compiles without errors with the patch above.

template <typename, unsigned> struct S { };
template <typename T, unsigned N> using U = S<T, __integer_pack(N)...>;
template <typename T> constexpr long g(T) { return 1l; }
template<typename T, typename TT = U<T, g(T{})>> struct X { };

template<typename T>
auto foo(T)
{
  []<unsigned>() {
      foo(1);
      X<T> x;
  };
}


More information about the Gcc-bugs mailing list