From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E6913858CDB; Mon, 5 Feb 2024 08:45:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E6913858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707122726; bh=uRGVQ5ULrMWmXpFfq99vjIYdE1xWMlosaKKyB5VdtgU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vldcX3ADCUEVXoj7aQE3gCTM0QQcijR4CCazL075kT1aZs/qS4A9BTT3rWamf760b 40GhMz0OJs1ITVhSTGD/od8y/w+dDpVgJsfRwpE3QTv5/XtMkGsbsF2/MeejUwLbB6 30zaVeUtJs1gvzGVDtnkFNn5KHnNG3BuZivDOLsQ= From: "de34 at live dot cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113563] Rejects capture of `this` in C++23 `this auto` lambda Date: Mon, 05 Feb 2024 08:45:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: de34 at live dot cn X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113563 Jiang An changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |de34 at live dot cn --- Comment #1 from Jiang An --- (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-t= his/ 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 lamb= da expression is in the immediate context (only the lambda body is excluded).=