https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99546
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
--- Comment #24 from Patrick Palka <ppalka at gcc dot gnu.org> ---
After r15-9212, it seems we now reject capturing lambdas inside non-templated
requires-expressions:
int main() {
int x=0;
constexpr auto b = requires { [x]{}; };
}
with
<source>: In function 'int main()':
<source>:3:33: error: no matching function for call to
'main()::<lambda()>::._anon_0(<brace-enclosed initializer list>)'
3 | constexpr auto b = requires { [x]{}; };
where before we would accept. Before r15-9219 however this was silently
wrong-code, so not really a regression.