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

            Bug ID: 99589
           Summary: lambda init-capture without initializer in C++20
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

gcc-9 should reject this code:

void f(auto... args) {  
  ([...args]{}, ...); 
}

according to [expr.prim.lambda#nt:init-capture], the "...args" in capture list
must follow by a initializer.

(goldbot: https://godbolt.org/z/eMo7aY)

Reply via email to