From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1888) id B26B3385840A; Thu, 18 Jan 2024 16:22:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B26B3385840A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705594973; bh=pbLao9D8rklhdF87h6s3ROAT2eOpy0Nwz59tkkGaZx4=; h=From:To:Subject:Date:From; b=QRj0I3+Fwbx5YfBLd3oWQlarw6XvkLdJ30zRcd4L68EIMPdtLg5cn0EkAljWymZ/H aJf1mx5L5QZjPBGQ1PNQPS1OYXCULpdxjqc63PVs0H+9WyQH5DHVUhRdHX6Rdo1f+0 LuKFNEY1YbE5RvPOBh/lNM/CCIaQDAnU0Is7e1Ug= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Patrick Palka To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-8254] libstdc++/pair: Guard P2321R2 changes with __glibcxx_ranges_zip X-Act-Checkin: gcc X-Git-Author: Patrick Palka X-Git-Refname: refs/heads/master X-Git-Oldrev: ae8581ea5c525b6418ec011439de4d870da173d2 X-Git-Newrev: 8cddf6f833e1c7a132fff9fa407cedf9fdf38bd9 Message-Id: <20240118162253.B26B3385840A@sourceware.org> Date: Thu, 18 Jan 2024 16:22:53 +0000 (GMT) List-Id: https://gcc.gnu.org/g:8cddf6f833e1c7a132fff9fa407cedf9fdf38bd9 commit r14-8254-g8cddf6f833e1c7a132fff9fa407cedf9fdf38bd9 Author: Patrick Palka Date: Thu Jan 18 11:21:34 2024 -0500 libstdc++/pair: Guard P2321R2 changes with __glibcxx_ranges_zip 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. Reviewed-by: Jonathan Wakely Diff: --- 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>>,