[Bug c++/80370] [7 Regression] ICE when using structured bindings and nested generic lambdas (tsubst_decomp_names)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 10 09:12:00 GMT 2017


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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Guess at least get should return int or int & rather than void:

template <typename> struct tuple_size;
template <long, typename> struct tuple_element;
template <typename...> struct tuple {};
template <typename... T> struct tuple_size<tuple<T...>> { static constexpr int
value = 1; };
template <typename T, typename... U> struct tuple_element<0, tuple<T, U...>> {
typedef T type; };
template <int, typename... T> int get (tuple<T...>);
int
main ()
{
  [](auto) { [](tuple<int> b) { auto [c] = b; }; }(0);
}


More information about the Gcc-bugs mailing list