From patchwork Wed Jan 17 02:40:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 188675 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp685209dye; Tue, 16 Jan 2024 20:15:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnYJ1D96SOd/8Cd6MSeHRZOm0D2ljsR/PrvYV58EY9B07zqDs0t4TUWGVXD6mCcxqh2wDC X-Received: by 2002:a05:622a:44b:b0:429:c8e2:9075 with SMTP id o11-20020a05622a044b00b00429c8e29075mr10411376qtx.39.1705464920609; Tue, 16 Jan 2024 20:15:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705464920; cv=pass; d=google.com; s=arc-20160816; b=r1babVWQ1+AQQEhpwMg6jt1zJlORWL5c5I5jOb+U8+dc0xCLt4DEizYbVxLoG4w3hl aJiiTFqnwDGqYKk4bnZLObSGy+CHNJfwwcQcCJt7voH4/5hiDmzIKECZBtfADuZ87rjp ATZ0TVjhOiQaJ0gkIua8QOSdU3mAJPmpptNDkrurxBkQcbcmJ3fUVyeGGUFSegXPdjNZ QXcnE2aWju3EzcxvyKf3qabUBzZ1hW0wP6ObHB7rK0Gu5YK0z6Qr1yraJACT1kJPkxhh +j/9TGLAKjq8/CFsdClOF4AsrBf/ekqgJBLKfxpm84zpbEOMIFjyYuMPDDk4rX3yea/s ZmmA== 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:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=1uFekh2NcudmpRnRLaxxZR5YMomnbQPcZ/VkPTUygAs=; fh=EVSvWd94bH3+6DLHxQIQnUkCnGLOu/mRCJOpcO366zA=; b=Jo1XrmHKgk/V+l+ENLiWki+Fp4678HJ8IcQpHWjrzdiGu8HN/UjhSKbVVF9XNZdfxU 8SBBkgGLORAhW54rHuLNC5Ssm9bUUpMkzIaKerSjPhZheDwH/wkgj6Sv4EC1n45OGLeT Jvh9BQH/0YOxR0+pKoOESRuYi7EDyznFzOBk+XJHTQSd35OfVcnke8vcsTEEvZxIE8F1 8n/So+tC8EhvsoqvZDy/bhM2uqklMDgBaSjfJ79w8bNy+qbN8cKm9GXDvLG41Q4bq7X7 KVWpEVNIApHdYwG8hp7WcsDY0p0Bn+5OYJEdUg4CspuB3gsRMyTTYfWeIRglrj1LErUY NzIg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Lg8SsP57; 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 u9-20020a05622a14c900b0042a0b356114si1358789qtx.313.2024.01.16.20.15.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 20:15:20 -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=Lg8SsP57; 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 AE9B6385F009 for ; Wed, 17 Jan 2024 02:41:23 +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 ESMTPS id 5CBE03858412 for ; Wed, 17 Jan 2024 02:40:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5CBE03858412 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 5CBE03858412 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=1705459212; cv=none; b=g74we5c1wyMj+7DI2GtK/Yhi+H4bFIOHafmfZLW6uUi7cXyfUSHqV3ZXQclWsKpj+tcXTj+Fl97hru07Zr94Y6qomQGnsMp3FA2eof9rNzThbJHk7s8CbmeEJOcaUIG08pjyXPKxFEw5zaj0auA8LK59E50vl74IMDoVUvHjuDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705459212; c=relaxed/simple; bh=vs5/aTGi7A1zxlYHzmRjXT12USqcclPwFsgtbcra840=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=alhpaya6YC9DZTvaJE0rZf1Jnepi+bsw/q8qlYl53heeqdfPqxCEs0rHul1AwCReCQ0FDbOw9aVSWv5d7W9jJ/hURz7SXBw7M3aZPjvTITP5egUTWjn2R89/A+sZtpeTvPdWMg1DhP/MiWJbPNNYDXSHkXbBK5MQ0L7lgq/paFs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705459211; 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; bh=1uFekh2NcudmpRnRLaxxZR5YMomnbQPcZ/VkPTUygAs=; b=Lg8SsP576NyUEL7/z4exAQYOGZhnp+fp2teU/8MhTSIR1L/rWyjLLxRlL+BujAyhBT+8Rq k46g6KRNs+EructzU/4MdAbX/cXB3blWLhMHIBgqeZPvwyMDGO7YPHNQ8/OYUXVIU7+bFy 30PSV/zYo70s3Y16cqsYxnx4KULs2KE= 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-16-mCKtSOTJMUySsfmoUe52ow-1; Tue, 16 Jan 2024 21:40:07 -0500 X-MC-Unique: mCKtSOTJMUySsfmoUe52ow-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7831ed4bb2aso1481324785a.0 for ; Tue, 16 Jan 2024 18:40:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705459205; x=1706064005; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1uFekh2NcudmpRnRLaxxZR5YMomnbQPcZ/VkPTUygAs=; b=RpAzJ5ufq+2eh4T7JGBP5vPVbuyHAmbxiZLAVpwce1KYiiuOHDxTeizVBGmVU0WpUF s2vyYTvtpr90iYeEa3rU58Zdtai5ZtrP8dEeFVPPIdTSOgVOI+JvzLKJTLNFBuqcCfO5 R9TE1H5D5Q58zWv1dvsspcmwVn7k+UX3GjSzGhhTkOnBCQCx2BnlDfiBVY7KXLZBH2Au vYGO3kRJIdErGKQQkhTZV7EreWk3+lNl6V+rYSR1KHx9HXo3Lr/b3MsJeoOY164Qubg8 uYeg7M5EY6wy0hf0LsZCK3woMKIyMULcsPZ7/FZtKFTV0R52B06v8sEeRU15Tm04xX8l OHmQ== X-Gm-Message-State: AOJu0YxulDBm8E7vG5xFkTSHUDysRrN7Jn0+503bDsGFbQx94r+EH3iJ v1CDn0k8+FU+reRcJ09mCymP05/UcRvhh+hQi1K/QW9zYpeszE5e6RAOO0d8uTwSvKXYG9Zhe2F Flj9mBRhuCpWr3Y3YQqBMNyfWuvkszw+0/Kgc7A35P74WsNdhZsHGHj/CeQ3jtvv4XEzn8RoIkp XWfByvl7I= X-Received: by 2002:a05:620a:4917:b0:783:247b:a6cf with SMTP id vy23-20020a05620a491700b00783247ba6cfmr8570675qkn.9.1705459205014; Tue, 16 Jan 2024 18:40:05 -0800 (PST) X-Received: by 2002:a05:620a:4917:b0:783:247b:a6cf with SMTP id vy23-20020a05620a491700b00783247ba6cfmr8570663qkn.9.1705459204749; Tue, 16 Jan 2024 18:40:04 -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:04 -0800 (PST) From: Patrick Palka To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Patrick Palka Subject: [PATCH 1/2] libstdc++/tuple: Guard P2321R2 changes with __cpp_lib_ranges_zip Date: Tue, 16 Jan 2024 21:40:01 -0500 Message-ID: <20240117024003.3390758-1-ppalka@redhat.com> X-Mailer: git-send-email 2.43.0.367.g186b115d30 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_H3, 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: 1788309584673655840 X-GMAIL-MSGID: 1788309584673655840 Guard additions from P2321R2 zip with __cpp_lib_ranges_zip instead of __cplusplus > 202020L. libstdc++-v3/ChangeLog: * include/std/tuple [__cplusplus > 202002L]: Guard P2321R2 changes with __cpp_lib_ranges_zip instead. --- libstdc++-v3/include/std/tuple | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index 2f6e419ea5b..7a045b3e6a1 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -324,7 +324,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } -#if __cplusplus > 202002L +#if __cpp_lib_ranges_zip // >= C++23 template constexpr _Tuple_impl(_Tuple_impl<_Idx, _UElements...>& __in) @@ -405,7 +405,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } -#if __cplusplus > 202002L +#if __cpp_lib_ranges_zip // >= C++23 template constexpr _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, @@ -449,7 +449,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION std::move(_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))); } -#if __cplusplus > 202002L +#if __cpp_lib_ranges_zip // >= C++23 template constexpr void _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) const @@ -480,7 +480,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Inherited::_M_swap(_M_tail(__in)); } -#if __cplusplus > 202002L +#if __cpp_lib_ranges_zip // >= C++23 constexpr void _M_swap(const _Tuple_impl& __in) const { @@ -549,7 +549,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) { } -#if __cplusplus > 202002L +#if __cpp_lib_ranges_zip // >= C++23 template constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>& __in) @@ -615,7 +615,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) { } -#if __cplusplus > 202002L +#if __cpp_lib_ranges_zip // >= C++23 template constexpr _Tuple_impl(allocator_arg_t, const _Alloc& __a, @@ -650,7 +650,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); } -#if __cplusplus > 202002L +#if __cpp_lib_ranges_zip // >= C++23 template constexpr void _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) const @@ -676,7 +676,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION swap(_M_head(*this), _M_head(__in)); } -#if __cplusplus > 202002L +#if __cpp_lib_ranges_zip // >= C++23 constexpr void _M_swap(const _Tuple_impl& __in) const { @@ -1775,7 +1775,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: _GLIBCXX20_CONSTEXPR void swap(tuple&) noexcept { /* no-op */ } -#if __cplusplus > 202002L +#if __cpp_lib_ranges_zip // >= C++23 constexpr void swap(const tuple&) const noexcept { /* no-op */ } #endif // We need the default since we're going to define no-op 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>>,