https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113563
waffl3x <waffl3x at protonmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |waffl3x at protonmail dot com --- Comment #6 from waffl3x <waffl3x at protonmail dot com> --- (In reply to Arthur O'Dwyer from comment #0) > Btw, I do like that GCC eagerly and SFINAE-friendlily rejects `[&](this T) > {}`. I hope fixing this bug doesn't require undoing that feature. > (By "SFINAE-friendly" I mean https://godbolt.org/z/fK4f13343 ) > See also > https://quuxplusone.github.io/blog/2024/01/23/capturing-lambda-deducing-this/ (In reply to Jiang An from comment #1) > Hmm... after reading CWG2672 > (https://cplusplus.github.io/CWG/issues/2672.html), I think the > SFINAE-friendliness is actually required since the parameter list of a > lambda expression is in the immediate context (only the lambda body is > excluded). Yeah, I spent a long time researching this part in particular. The wording for this particular section suggests it must be SFINAE friendly. So fixing it will definitely not undo that feature. I'll try to find time to look into this now, I don't have access to a system that can easily compile GCC though so it might take a bit.