https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106552
--- Comment #3 from Jason Liam ---
Yes, msvc also accepts this but msvc also emits a diagnostic with the
flag *std:c++20
/W4 .*
On Mon, 8 Aug 2022, 22:03 pinskia at gcc dot gnu.org, <
gcc-bugzi...@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106552
--- Comment #2 from Andrew Pinski ---
expr.prim.lambda.capture/6 seems to imply this is invalid code.
But the example is only with the parameter rather than a local variable ...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106552
--- Comment #1 from Andrew Pinski ---
clang is the only compiler I tried which rejects this ...
ICC, MSVC all accept this code.