[Bug c++/83793] Pack expansion outside of lambda containing the pack incorrectly rejected

2018-01-15 Thread kretz at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83793

--- Comment #4 from Matthias Kretz  ---
(In reply to Jonathan Wakely from comment #2)
> Looks like a dup of PR 47226

Ah, yes. Sorry for missing it, I recall seeing it before. I agree, a backport
would be nice, but an overhaul is not a backportable bugfix. I really need to
switch to GCC 8 just for the lambda fixes. :-)

Thanks!

[Bug c++/83793] Pack expansion outside of lambda containing the pack incorrectly rejected

2018-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83793

Martin Sebor  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Martin Sebor  ---
Resolving as a dupe of pr47226 based on comment #2.

*** This bug has been marked as a duplicate of bug 47226 ***

[Bug c++/83793] Pack expansion outside of lambda containing the pack incorrectly rejected

2018-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83793

--- Comment #2 from Jonathan Wakely  ---
Looks like a dup of PR 47226 which is already fixed on trunk, but I don't think
the recent overhaul of lambda expression handling is suitable to be backported.

[Bug c++/83793] Pack expansion outside of lambda containing the pack incorrectly rejected

2018-01-12 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83793

Martin Sebor  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  ---
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 x = {[&]() -> int { return Indexes;
}()...};
^~~
t.C:6:68: note: ‘Indexes’
t.C: In function ‘auto f(std::index_sequence)’:
t.C:6:80: error: expansion pattern ‘()’ contains no argument packs
 td::array 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.