From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 162E03858291; Tue, 5 Mar 2024 18:46:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 162E03858291 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709664405; bh=a4a8/QNHGGu8GN11UIO+ow+iK2DPvCh1QeJqAqwMonE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=P8oTaZHGL8UE2ytBJ0YEV2KHgjkGW9zT1P0sC1+9VO18hdyUtnpUzQJDOhMM3WkoW 3ZanLCMspcrSomc4cLYXtEFJ6hEc53Y14aL7xhAliZy0UM4+9sHLkA9IIlAAtxDda1 15TuFMrjwrMC0KCFhUAUK2HgtBUzOf/tC0N47IVA= From: "src at andyf dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114242] Coroutine with lambda-coroutine and operator new does not compile Date: Tue, 05 Mar 2024 18:46:44 +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: unknown X-Bugzilla-Keywords: C++-coroutines, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: src at andyf dot de 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: 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=3D114242 --- Comment #4 from Andreas Fertig --- Thanks for looking into the issue! While CWG 2585 tweaks the wording, my reading is that the code should be va= lid even with C++20. Regardless of that, without the lambda, the code compiles and uses a custom allocator.=20 After playing with the test case, I could reduce it to having only a coroutine-lambda with a promise_type that has a custom operator new: https://compiler-explorer.com/z/W53nKsfxG Sorry for not having that done initially! I suspect this case wasn't implemented (because it isn't obvious?).=