From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D1DD73858D33; Tue, 31 Jan 2023 21:21:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1DD73858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675200110; bh=WI2SqWIJSAbtYG69cSZwJMYhzKFKVGmw3EstP8yDPhM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ApebKBluJD2kGMn5mqcvpc0lgnq2uyFiHtJZOXXB6Kag+/WM9swEcpuWUVokQ0SFZ 0aDZISyKTWb6hJp7ndNKxTpgjF3Inmlr9AJG7rxIe1zCeoww2pAqQ4esR/rq/pI0A+ T3qL1ryzCw4dEFEa7X+r4/jYkj3WaPgQUN1pHPaM= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108619] Compilation error if the construct method of the allocator isn't implemented and the detructor of value_type is private Date: Tue, 31 Jan 2023 21:21:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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=3D108619 --- Comment #5 from Andrew Pinski --- (In reply to gccbugzilla from comment #3) > (In reply to Andrew Pinski from comment #2) > > Once I add: > >=20 > > template struct rebind { > > typedef alloc other; > > }; > >=20 > > To alloc, it works correctly. > > The error message on the trunk gives the best error message of what is = going > > wrong even. > > So this is invalid. >=20 > I just tried, but apparently it doesn't work > (https://godbolt.org/z/ehhzYd5Wo) >=20 > Have I misinterpreted your response? Also rebind is too optional, it's st= ill > a bug if it doesn't compile without it. I missed -std=3Dc++20 part before. The rebind fixes the compiliation issue without -std=3Dc++20 ....=