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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
cvise reduced into:
template <int a> struct b { static constexpr int value = a; };
template <typename c> c e(long);
template <typename c> auto d() -> decltype(e<c>(0));
template <typename> struct tuple_size;
template <unsigned long, typename> struct tuple_element;
template <typename...> struct l { template <int> void get(); };
l<int, int, int, void> f;
template <typename... g> struct tuple_size<l<g...>> : b<sizeof... (g)> {};
template <unsigned long m, class... g> struct tuple_element<m, l<g...>> {
  using type = decltype(d<l<>>().get<m>());
};
auto [h, i, j, k] = f;

Another testcase that ICEs the same way:
namespace std {
  template<typename T> struct tuple_size;
  template<int, typename> struct tuple_element;
}
struct A {
  int i;
  template <int I> void get() { }
};
template<> struct std::tuple_size<A> { static const int value = 2; };
template<int I> struct std::tuple_element<I,A> { using type = void; };
A a = { 42 };
auto [ x, y ] = a;

Reply via email to