[Bug c++/103212] requires expression with lambda inside causes a parse error
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 12 23:27:47 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103212
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-11-12
Summary|requires expression with |requires expression with
|lambda fails |lambda inside causes a
| |parse error
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Simplified testcase:
static_assert(requires { [](int){}(0); });
Note even though MSVC parses this code correctly, it still says the
static_assert is valid which is obviously wrong :).
More information about the Gcc-bugs
mailing list