From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 76016388904F; Thu, 15 Dec 2022 09:36:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76016388904F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671096967; bh=oMLK/iCCgNVtC1Y4ads6ib726d9SgSr97/oydAp/RWo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Fk1sQbz2qzqvkcOR2c8xPHLtADEPMKBc6nwFdMU1nnMW7NY14ARdgXmzSoFJsNg2o DBh7iDcPhsEB0iV+hw7bvZ3rPNVRhMPrqBwwUqnH5j8SOGvbexbSkkGeWk14jbP0Pu 8j1ptuh+EcgX82UwxVRAZDnZ4rwW1xBsBK9zXPEM= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108118] std::weak_ptr lacks a self-usurp check on move Date: Thu, 15 Dec 2022 09:36:07 +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: unknown 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: cf_reconfirmed_on bug_status everconfirmed 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=3D108118 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-12-15 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #5 from Jonathan Wakely --- Actually for this type the standard does require it to be effectively a no-= op: weak_ptr& operator=3D(weak_ptr&& r) noexcept; Effects: Equivalent to weak_ptr(std::move(r)).swap(*this).=