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

            Bug ID: 89686
           Summary: Lambda pack capture with pack on both sides
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

Vittorio, the wizard of lambda+pack bugs, is at it again:
https://stackoverflow.com/questions/55127906/lambda-pack-capture-with-ellipsis-on-both-sides-what-is-the-meaning

template <typename... Ts>
void foo(Ts... xs)
{
    [...xs...]{}();
}

int main()
{
    foo(0, 1, 2);
}

gcc trunk accepts this, but it should be ill-formed - you can't have ellipses
on both sides. Gotta be either simple-capture [...xs] or init-capture
[...xs=xs]

Reply via email to