From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 96F0B3857C45; Sat, 25 Feb 2023 09:06:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96F0B3857C45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677316012; bh=efgie6BVJzAWU12Rx1lTRW+rjVpDzlBqW6v4SYvNBGI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TZn0EbE8+qQ+AqebBL/uMkio1itGUydYIO9ZjQBz6ZNDdl6yHBlOkIK5Kti/yxla/ ORtUxArUfoYcVgGAx5R3lSf+8cVSH91qjuqHUvDvv/xL9MSwbRl7YbuJ2cKCHCgJCc tR6MO32uNAp/6YGpLVH8qMBZNKLRAYjkmAhal22o= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108846] std::copy, std::copy_n and std::copy_backward on potentially overlapping subobjects Date: Sat, 25 Feb 2023 09:06:49 +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: 13.0 X-Bugzilla-Keywords: ABI 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: 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=3D108846 --- Comment #13 from Jonathan Wakely --- That specialization is only used for trivial types, so moving is equivalent= to copying (otherwise we couldn't use memmove anyway). So it doesn't make any difference whether you move an lvalue or rvalue, it's just a bitwise copy anyway.=