From patchwork Wed Jan 17 02:40:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 188658 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp656592dye; Tue, 16 Jan 2024 18:41:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHsFT0AJU+J9RkPdSVFPn4EvfMjw9m1A4sddb3f6NbBkux4z/fsRXvrsa8DazhyRmbyVpjv X-Received: by 2002:a0c:9c43:0:b0:681:79cf:e6e with SMTP id w3-20020a0c9c43000000b0068179cf0e6emr508998qve.77.1705459268485; Tue, 16 Jan 2024 18:41:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705459268; cv=pass; d=google.com; s=arc-20160816; b=gm3HZtlssvPVA8aWVTLeYV8mSHi9PjvbZ7HhwnTVAYxaUf0fYBVn4SZpKukN06UQes xA5mNlEwdJWpckfUvcySFJvEtw9R3T51rQlhTXiiaL+gQz/7GHYgPvEu8+GV20pNMFzf dyMa5YIOfk93SNNrS2g5FSMJOumAvPiwKBo2w1ngsB4TRjmlmB/kLB64iS3gm6XWrtZ+ 7KqyOwPWIYQ/vTjZNDo41h5XR1edyzisnKt+nEGohlJnTcu0D9IP17SnBDk8p+/7/V4W p87pBHcmARWD1X85Ir1QHkYlreSuplm6M2eLMjW5fPDnCc5ciwidJhnh7yEsxw1UdQyz 4Gyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=mEtBkSFabqaPzewrtBv+y0R6CQ8lzv67Fh4UrKuHqjE=; fh=EVSvWd94bH3+6DLHxQIQnUkCnGLOu/mRCJOpcO366zA=; b=P1apew0EWEEZsY07sqPJeWMcyhbBGSk8rVaN89pVdsTXyXrWASGFLTaLXPJNRAxYEK HlQM9lMZM/xC8zfrjV6hcLP8JI5kU1TueSCeT89EHlTwx5aYEYZPIK4+ZSry77GmvSUb SNV83s7mDuGywEqVIawjq5DHivENZIhPdsQeRMwybhssPm3t7uJI2gP+t4Rz02/KluAl 4DBxy6doYbiBkag9Hg5YEp1DvPqexmj1U+Ym/cIn1H064vb2etAcr69sQ/P5puqn/FuO HpUmB2kYT8y/MmH2shC3t/QtTjGunWdiGfl2Zy0y6dKvmzb5zCCIjUZdjxsQJ/hIoOqe srRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Liy3Deyk; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id x6-20020ae9e646000000b007725a68ea34si10719617qkl.89.2024.01.16.18.41.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 18:41:08 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Liy3Deyk; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F32B385735D for ; Wed, 17 Jan 2024 02:41:08 +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.129.124]) by sourceware.org (Postfix) with ESMTPS id 0511C3858C31 for ; Wed, 17 Jan 2024 02:40:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0511C3858C31 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 0511C3858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705459211; cv=none; b=Lx/2P10SqEgKHR17Tit70LGt+JKpX525cnalMd34FhmUeBCjl6/qDRLTfkYljLCQ9TOkC+3yXrJMSjPrwGmSgQMj1vbOJKdU8z7zmJPQH1OiFRjCgxQdk+NZJVEZx7BRhaHkA+fwBda1AbkglD5ooo6MyB1K+8CsZwWmKZ7/SRo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705459211; c=relaxed/simple; bh=VE6mDq6eRl2KHy22gHU7c3Umbmb1RieZkDAF6m+n3UU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IcD6AAbH+jr+cnGW2yejD3X11Nd4raABVcde0VECMfA7RtCnxpavJeTeY9envJwT6t3zOLDofn255yFktuZk4cZWiyhVhRODD8TYJPq4rXXgvVCw6dq37U+vUHa+rxNMGa8KsQoAMyn2E2QR5RLw7jVlIjO35/kQm6V0ETXi/Cg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705459209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mEtBkSFabqaPzewrtBv+y0R6CQ8lzv67Fh4UrKuHqjE=; b=Liy3Deyk1ipk4QoPes6s3gYyJMLbpL2p7qmWlO58WVX1mJqgWD/K52uH5M5rtb26Q1GcZQ zZF+V51ygTdPCpUl3q+ebGb8/hX1o0b3O8rQE5d7CHn/gboX4LE/RwpE6QPo5EaROaS1gL MrOXIeTNl9VB9PczTvVSUo4VErtaqLM= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-111-6ubaQ_oBOOW7lXJmW4hfpw-1; Tue, 16 Jan 2024 21:40:08 -0500 X-MC-Unique: 6ubaQ_oBOOW7lXJmW4hfpw-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-78330275051so1124427485a.3 for ; Tue, 16 Jan 2024 18:40:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705459207; x=1706064007; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mEtBkSFabqaPzewrtBv+y0R6CQ8lzv67Fh4UrKuHqjE=; b=RGSwpgmBeZP0Lc800oHiW1nL27eUUy29/WGEn78pZkuAqJxr1O9Q2n6S19er36389t rBIuqXRm65V+227+6JZTotPJ0+WD/YeJ2xYfelrFI4Edh2fRZfO1xpUahUfRM8aZkshb ZwNRcqBkog+p87cZnL9yKLi2ys9vmZPyLATT5rp4e0M/cqciinDY6oIupwRpitIk7KQt 9yDMJFq24IIqyV5P+DmcEVHiZQw7np20l49i52MPA2jXxl9mtRB+ukcGUmCMRD8vXf15 RnZdVhWD665CAK7tx5utaiF4I0k9miKrb6GvF5rWYtJbli+GurNwDldps8ZPJLDAumu7 mDlQ== X-Gm-Message-State: AOJu0YzqqLQgR9v9ypYEvH4/LLNpItkC2o1Jw9f/1A92wpC1nT52KFPE v193+JCS63759Hz4Iw5tn6kIOGh4IXDg7VRrskEz7jmS/c7hRq0kO/Zcs3CY6r4sB2rCaVbdXw/ 7Usc+4u4CrDjKAt49Tq9iTm1d2ZZEXxKo5w4IIZmbHX2z5vJqK982yI1t7mkXu7/k/ccSTPeyfs xHf8dJ2RI= X-Received: by 2002:a05:620a:11ad:b0:783:4f76:2a71 with SMTP id c13-20020a05620a11ad00b007834f762a71mr7799698qkk.17.1705459207294; Tue, 16 Jan 2024 18:40:07 -0800 (PST) X-Received: by 2002:a05:620a:11ad:b0:783:4f76:2a71 with SMTP id c13-20020a05620a11ad00b007834f762a71mr7799692qkk.17.1705459206932; Tue, 16 Jan 2024 18:40:06 -0800 (PST) Received: from localhost.localdomain (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id e9-20020a05620a208900b007833c4dddfdsm4125534qka.53.2024.01.16.18.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 18:40:05 -0800 (PST) From: Patrick Palka To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Patrick Palka Subject: [PATCH 2/2] libstdc++/pair: Guard P2321R2 changes with __glibcxx_ranges_zip Date: Tue, 16 Jan 2024 21:40:02 -0500 Message-ID: <20240117024003.3390758-2-ppalka@redhat.com> X-Mailer: git-send-email 2.43.0.367.g186b115d30 In-Reply-To: <20240117024003.3390758-1-ppalka@redhat.com> References: <20240117024003.3390758-1-ppalka@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.8 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_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_WEB, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788303657864860928 X-GMAIL-MSGID: 1788303657864860928 Similar to the previous change for , but since stl_pair.h is an internal header we need to use the corresponding internal macro instead. libstdc++-v3/ChangeLog: * include/bits/stl_pair.h [__cplusplus > 202002L]: Guard P2321R2 changes with __glibcxx_ranges_zip instead. --- libstdc++-v3/include/bits/stl_pair.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 52f532f3c39..acd0c7b58f9 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -211,7 +211,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION swap(second, __p.second); } -#if __cplusplus > 202002L +#if __glibcxx_ranges_zip // >= C++23 // As an extension, we constrain the const swap member function in order // to continue accepting explicit instantiation of pairs whose elements // are not all const swappable. Without this constraint, such an @@ -360,7 +360,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr explicit(!_S_convertible<_U1, _U2>()) pair(pair<_U1, _U2>&&) = delete; -#if __cplusplus > 202002L +#if __glibcxx_ranges_zip // >= C++23 /// Converting constructor from a non-const `pair` lvalue template requires (_S_constructible<_U1&, _U2&>()) && (!_S_dangles<_U1&, _U2&>()) @@ -464,7 +464,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } -#if __cplusplus > 202002L +#if __glibcxx_ranges_zip // >= C++23 /// Copy assignment operator (const) constexpr const pair& operator=(const pair& __p) const @@ -887,7 +887,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } -#if __cplusplus > 202002L +#if __glibcxx_ranges_zip // >= C++23 template requires is_swappable_v && is_swappable_v constexpr void @@ -1101,7 +1101,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // __glibcxx_tuples_by_type -#if __cplusplus > 202002L +#if __glibcxx_ranges_zip // >= C++23 template class _TQual, template class _UQual> requires requires { typename pair, _UQual<_U1>>,