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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-01-13
                 CC|                            |msebor at gcc dot gnu.org
      Known to work|                            |8.0
     Ever confirmed|0                           |1
      Known to fail|                            |7.2.0

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
GCC 8 accepts the code without any errors.

Confirmed with 7.2 and the following output (please remember to provide
compiler output with bug reports about wrong diagnostics):

t.C: In lambda function:
t.C:6:68: error: parameter packs not expanded with ‘...’:
     std::array<int, sizeof...(Indexes)> x = {[&]() -> int { return Indexes;
}()...};
                                                                    ^~~~~~~
t.C:6:68: note:         ‘Indexes’
t.C: In function ‘auto f(std::index_sequence<Indexes ...>)’:
t.C:6:80: error: expansion pattern ‘<lambda>()’ contains no argument packs
 td::array<int, sizeof...(Indexes)> x = {[&]() -> int { return Indexes;
}()...};
                                                                           ^~~


There have been many changes in lambda support in GCC 8.  I'm not sure which
one of them has fixed it or whether it would be feasible to backport it to 7.x.
 My guess is that it's unlikely.

Reply via email to