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: 84225 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F3B6C3857022 for ; Wed, 17 Jan 2024 02:41:00 +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-Google-Smtp-Source: AGHT+IGAzTUsuKq9V01QSXMfuQhxQ6oMTH/pM8l+KnJB1KQPRKjF4iJkfSb8iv/g4BSvNt344lxgNg== 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+patchwork=sourceware.org@gcc.gnu.org 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