diff mbox series

[1/2] libstdc++/tuple: Guard P2321R2 changes with __cpp_lib_ranges_zip

Message ID 20240117024003.3390758-1-ppalka@redhat.com
State New
Headers show
Series [1/2] libstdc++/tuple: Guard P2321R2 changes with __cpp_lib_ranges_zip | expand

Commit Message

Patrick Palka Jan. 17, 2024, 2:40 a.m. UTC
Guard <tuple> 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(-)

Comments

Jonathan Wakely Jan. 17, 2024, 7:43 a.m. UTC | #1
On Wed, 17 Jan 2024 at 02:40, Patrick Palka wrote:
>
> Guard <tuple> additions from P2321R2 zip with __cpp_lib_ranges_zip
> instead of __cplusplus > 202020L.

Ah yes, I should have changed all of these in r14-7225-gf8a5298c97c460

OK for trunk, thanks.


>
> 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<typename... _UElements>
>         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<typename _Alloc, typename _UHead, typename... _UTails>
>         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<typename... _UElements>
>         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<typename _UHead>
>         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<typename _Alloc, typename _UHead>
>         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<typename _UHead>
>         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
> --
> 2.43.0.367.g186b115d30
>
diff mbox series

Patch

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<typename... _UElements>
 	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<typename _Alloc, typename _UHead, typename... _UTails>
 	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<typename... _UElements>
 	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<typename _UHead>
 	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<typename _Alloc, typename _UHead>
 	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<typename _UHead>
 	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