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

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
namespace std {
template <typename _Tp> _Tp declval();
template <class _E> class initializer_list {
  _E *_M_len;

public:
  unsigned long size;
  _E begin();
};
template <typename, unsigned> struct array { void operator[](long); };
} // namespace std

template <class> struct simd {
  static int size();
  template <class F> simd(F, decltype(std::declval<F>()(0)) * = nullptr) {}
};
template <class V, class... F>
void test_tuples(std::initializer_list<std::array<float, 1>> data,
                 F... fun_pack) {
  auto it = data.begin();
  const int remaining = V::size();
  [](...) {}((fun_pack([&](auto) { it[remaining]; }), 0)...);
}

void f() {
  test_tuples<simd<float>>({}, [](simd<float>) {});
}

Reply via email to