From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1888) id 8C6903858D33; Thu, 18 Jan 2024 16:22:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C6903858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705594968; bh=G7tjz9Z/mk14YjgTGISBvHfvfkf5XdSk9D0qUbrYK4Q=; h=From:To:Subject:Date:From; b=eaDl/dpO8vWNHQmu0vmIgu4y6bk7gqoejYHjCFhJSmAcU+N8O2B0M1B2yvGeXrxJ2 u4gEkk4wfId6cKlRViUl13SX9gx/CbK6Ted9iOoWoSgE5LpYCpwyEjCAba/T9+01zf gdSVU00z9NPRaa+hpUGt9KNCv9yNWJuQhtRmwA/0= 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-8253] libstdc++/tuple: Guard P2321R2 changes with __cpp_lib_ranges_zip X-Act-Checkin: gcc X-Git-Author: Patrick Palka X-Git-Refname: refs/heads/master X-Git-Oldrev: 3d3145e9e1461e92bef02d55d36990261dd0444d X-Git-Newrev: ae8581ea5c525b6418ec011439de4d870da173d2 Message-Id: <20240118162248.8C6903858D33@sourceware.org> Date: Thu, 18 Jan 2024 16:22:48 +0000 (GMT) List-Id: https://gcc.gnu.org/g:ae8581ea5c525b6418ec011439de4d870da173d2 commit r14-8253-gae8581ea5c525b6418ec011439de4d870da173d2 Author: Patrick Palka Date: Thu Jan 18 11:21:16 2024 -0500 libstdc++/tuple: Guard P2321R2 changes with __cpp_lib_ranges_zip 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. Reviewed-by: Jonathan Wakely Diff: --- 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