public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99589] New: lambda init-capture without initializer in C++20
@ 2021-03-15  4:10 hewillk at gmail dot com
  2021-03-19  2:37 ` [Bug c++/99589] " hewillk at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: hewillk at gmail dot com @ 2021-03-15  4:10 UTC (permalink / raw)
  To: gcc-bugs

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/99589] lambda init-capture without initializer in C++20
  2021-03-15  4:10 [Bug c++/99589] New: lambda init-capture without initializer in C++20 hewillk at gmail dot com
@ 2021-03-19  2:37 ` hewillk at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: hewillk at gmail dot com @ 2021-03-19  2:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> ---
reduced:

auto f(auto x) {
 [...x]{};
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-19  2:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15  4:10 [Bug c++/99589] New: lambda init-capture without initializer in C++20 hewillk at gmail dot com
2021-03-19  2:37 ` [Bug c++/99589] " hewillk at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).