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: 1887237 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=Lg8SsP57; 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 4TF99L2jVDz1yPJ for ; Wed, 17 Jan 2024 13:40:54 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63ACF3857BB7 for ; Wed, 17 Jan 2024 02:40:52 +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+incoming=patchwork.ozlabs.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 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: 1887236 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=Liy3Deyk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4TF9940yT4z1yPJ for ; Wed, 17 Jan 2024 13:40:40 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 222143857C7C for ; Wed, 17 Jan 2024 02:40:38 +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-Google-Smtp-Source: AGHT+IH7VtW0AcNHgBDbUlgi7HgoVP7qozLa8IC2DS7K3x9uqWY852jh9UH983cacZjy7rwrnZ80FA== 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+incoming=patchwork.ozlabs.org@gcc.gnu.org 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>>,