[Bug c++/94252] New: Can't use a lambda in a requires expression
barry.revzin at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Mar 21 17:51:02 GMT 2020
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(); });
| ^~~~~~~~~~~~~~~~~
More information about the Gcc-bugs
mailing list