public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8253] libstdc++/tuple: Guard P2321R2 changes with __cpp_lib_ranges_zip
@ 2024-01-18 16:22 Patrick Palka
  0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2024-01-18 16:22 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:ae8581ea5c525b6418ec011439de4d870da173d2

commit r14-8253-gae8581ea5c525b6418ec011439de4d870da173d2
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Jan 18 11:21:16 2024 -0500

    libstdc++/tuple: Guard P2321R2 changes with __cpp_lib_ranges_zip
    
    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.
    
    Reviewed-by: Jonathan Wakely <jwakely@redhat.com>

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<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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-18 16:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18 16:22 [gcc r14-8253] libstdc++/tuple: Guard P2321R2 changes with __cpp_lib_ranges_zip Patrick Palka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).