From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 166203858D33; Tue, 31 Jan 2023 21:59:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 166203858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675202349; bh=SzND5TniXvAM7CaMxpLrOYZhhpVXJFammOXJw+T6yCc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kKAluVyIbb1Q7nJq/v5t0Aw2W0dragbPEF2A/ShW6F9AVNrUGCyOVVopRdXom7rJM LF+PjskQdQ5psCFUK9bOIcS+OClAaALD8oSqvoTsDCrQwGEzgBRzLZ5iMVI5VlYFcP /jYZ3yAL+7BfdJkuFJElBIrSOksRbh6YJlBXdzL8= From: "redi 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:59:08 +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: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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: bug_status everconfirmed cf_reconfirmed_on 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 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2023-01-31 --- Comment #9 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #5) > I missed -std=3Dc++20 part before. The rebind fixes the compiliation issue > without -std=3Dc++20 .... Right, but the bug report is about c++20 mode, and the rebind isn't needed = in C++20 (because std::allocator::rebind doesn't exist, so the default implementation of rebinding does the right thing for alloc). (In reply to Andrew Pinski from comment #6) > With clang and libc++ we get: >=20 > /opt/compiler-explorer/clang-trunk-20230131/bin/../include/c++/v1/__memor= y/ > uninitialized_algorithms.h:597:3: error: static assertion failed due to > requirement '__is_cpp17_move_insertable, void>::value': The > specified type does not meet the requirements of Cpp17MoveInsertable > static_assert(__is_cpp17_move_insertable<_Alloc>::value, > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > Which I think is the best error message really. libstdc++v3 should add a > similar static assert I think. I think this is a libc++ bug in their __cpp17_move_insertable trait, which = just uses is_move_constructible here, which is false because of the private destructor. I agree there's a bug here, but I'm not sure where yet.=