public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94252] New: Can't use a lambda in a requires expression
@ 2020-03-21 17:51 barry.revzin at gmail dot com
  2020-03-23 11:38 ` [Bug c++/94252] " julius_huelsmann at freenet dot de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: barry.revzin at gmail dot com @ 2020-03-21 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94252
           Summary: Can't use a lambda in a requires expression
           Product: gcc
           Version: 10.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: ---

This program:

    auto f = []{ return 0; };
    static_assert(requires { f(); });

Fails to compile on trunk (https://godbolt.org/z/DEuoVM), with the error:

<source>:2:15: error: static assertion failed
    2 | static_assert(requires { f(); });
      |               ^~~~~~~~~~~~~~~~~

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

end of thread, other threads:[~2020-03-28 13:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-21 17:51 [Bug c++/94252] New: Can't use a lambda in a requires expression barry.revzin at gmail dot com
2020-03-23 11:38 ` [Bug c++/94252] " julius_huelsmann at freenet dot de
2020-03-24 18:08 ` ppalka at gcc dot gnu.org
2020-03-25  4:16 ` ppalka at gcc dot gnu.org
2020-03-28 12:59 ` cvs-commit at gcc dot gnu.org
2020-03-28 13:00 ` ppalka at gcc dot gnu.org

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).