From patchwork Sun Sep 22 16:51:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1988347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=huniy4xq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XBXHz6C6Bz1xsM for ; Mon, 23 Sep 2024 02:53:19 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 07DC73858D39 for ; Sun, 22 Sep 2024 16:53:18 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id B93BB385841D for ; Sun, 22 Sep 2024 16:51:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B93BB385841D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B93BB385841D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727023874; cv=none; b=aJb7+M5T/Mch5MuvyJRCDnA11EsqJN4CVxSXvdxTrrZCXGPfngiFXaANpv3yxUOaHeQwuxXrzIwEbfsShdkzwd9yiZVUPC02t6bgYYsW3DI5KuakGQjUfBRMSHdtjhCQLkAt2dLOTbh2LIsymXMmjzh0pHhpJRfc79f3k9FAB5g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727023874; c=relaxed/simple; bh=0U9gnt5oX7kjSM8p9TfTDe0b/nm1vZ53keS8wGE6wAA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=AKEAeVEXJQPVfQ/iuoUR5t80R0IvB6DweC/eWUbrAZW3TDcWNtaiIaCjfjeleSy/AQLQ663tczckcAv7bF+B1h+Fn5+sKCrJePPpeqfNmd29gCvHXSO34UYfQQzocOLlO90COZMS7ClNsREdLJ/ZH5y3mRhu178nPDTfG4D4Xf4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727023872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aGy7WdZoEG5TIWxkP4rpKx0kIy7Hb3ajNoaxsLXq57s=; b=huniy4xqAtBBoxxJgmTB8m6CzgzhMll1IyCCN289VW3BYzMpSIGg/XJO0KWMbzU8FUcjLT SIFVzUlGdu597R5PsQqM14MJZi4rBz/DhQOX0dJTiWAFPVAa98ncbL5sr2YDO138nN+x2J PbzQqDMkI6xoWlnt0swx7bqqGTiH+WE= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-206-TZfVdgghMgCXJ70qgvaJZw-1; Sun, 22 Sep 2024 12:51:10 -0400 X-MC-Unique: TZfVdgghMgCXJ70qgvaJZw-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (unknown [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D3A45190ECF8; Sun, 22 Sep 2024 16:51:09 +0000 (UTC) Received: from localhost (unknown [10.42.28.136]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3A5A730001A1; Sun, 22 Sep 2024 16:51:08 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix condition for ranges::copy to use memmove [PR116754] Date: Sun, 22 Sep 2024 17:51:01 +0100 Message-ID: <20240922165107.1435627-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/116754 * include/bits/ranges_algobase.h (__copy_or_move): Fix order of arguments to __memcpyable. --- libstdc++-v3/include/bits/ranges_algobase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/ranges_algobase.h b/libstdc++-v3/include/bits/ranges_algobase.h index 2a36ba69775..40c628b3818 100644 --- a/libstdc++-v3/include/bits/ranges_algobase.h +++ b/libstdc++-v3/include/bits/ranges_algobase.h @@ -286,7 +286,7 @@ namespace ranges { if (!std::__is_constant_evaluated()) { - if constexpr (__memcpyable<_Iter, _Out>::__value) + if constexpr (__memcpyable<_Out, _Iter>::__value) { using _ValueTypeI = iter_value_t<_Iter>; auto __num = __last - __first;