diff mbox series

[committed] libstdc++: Update __cpp_lib_adaptor_iterator_pair_constructor value

Message ID YVwO2VcyWZ7hEBik@redhat.com
State New
Headers show
Series [committed] libstdc++: Update __cpp_lib_adaptor_iterator_pair_constructor value | expand

Commit Message

Jonathan Wakely Oct. 5, 2021, 8:37 a.m. UTC
On 01/10/21 20:43 +0100, Jonathan Wakely wrote:
>This adds a feature that was recently added to the C++23 working draft.
>
>Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
>
>libstdc++-v3/ChangeLog:
>
>	* include/bits/stl_queue.h
>	(__cpp_lib_adaptor_iterator_pair_constructor): Define for C++23, as
>	per P1425R4.
>	(queue(InputIterator, InputIterator)): Likewise.
>	(queue(InputIterator, InputIterator, const Alloc&)): Likewise.
>	* include/bits/stl_stack.h
>	(__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
>	(stack(InputIterator, InputIterator)): Likewise.
>	(stack(InputIterator, InputIterator, const Alloc&)): Likewise.
>	* include/std/version (__cpp_lib_adaptor_iterator_pair_constructor):
>	Define.
>	* testsuite/23_containers/queue/cons_from_iters.cc: New test.
>	* testsuite/23_containers/stack/cons_from_iters.cc: New test.

I forgot to update the patch to use the final value of the feature
test macro. It should be 202106L.

Tested powerpc64le-linux. Committed to trunk.
diff mbox series

Patch

commit 9e136807c5b5476ed02a2a40a14fe0df3c0f4f18
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Oct 4 20:16:47 2021

    libstdc++: Update __cpp_lib_adaptor_iterator_pair_constructor value
    
    I started implementing this feature before it was voted into the C++ WP,
    and forgot to update the feature test macro after it was approved.
    
    This defines it to the correct value, as specified in the C++23 draft.
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/stl_queue.h
            (__cpp_lib_adaptor_iterator_pair_constructor): Set to correct
            value.
            * include/bits/stl_stack.h
            (__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
            * include/std/version
            (__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
            * testsuite/23_containers/queue/cons_from_iters.cc: Update
            expected value.
            * testsuite/23_containers/stack/cons_from_iters.cc: Likewise.

diff --git a/libstdc++-v3/include/bits/stl_queue.h b/libstdc++-v3/include/bits/stl_queue.h
index 3da65c78eb8..68cfe865147 100644
--- a/libstdc++-v3/include/bits/stl_queue.h
+++ b/libstdc++-v3/include/bits/stl_queue.h
@@ -196,7 +196,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	: c(std::move(__q.c), __a) { }
 
 #if __cplusplus > 202002L
-#define __cpp_lib_adaptor_iterator_pair_constructor 202100L
+#define __cpp_lib_adaptor_iterator_pair_constructor 202106L
 
       template<typename _InputIterator,
 	       typename = _RequireInputIter<_InputIterator>>
diff --git a/libstdc++-v3/include/bits/stl_stack.h b/libstdc++-v3/include/bits/stl_stack.h
index f04fa6af479..429743f5514 100644
--- a/libstdc++-v3/include/bits/stl_stack.h
+++ b/libstdc++-v3/include/bits/stl_stack.h
@@ -171,7 +171,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       : c(std::move(__c)) { }
 
 #if __cplusplus > 202002L
-#define __cpp_lib_adaptor_iterator_pair_constructor 202100L
+#define __cpp_lib_adaptor_iterator_pair_constructor 202106L
 
       template<typename _InputIterator,
 	       typename = _RequireInputIter<_InputIterator>>
diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version
index 66b3d1704b7..3d4a4142eec 100644
--- a/libstdc++-v3/include/std/version
+++ b/libstdc++-v3/include/std/version
@@ -281,7 +281,7 @@ 
 
 #if __cplusplus > 202002L
 // c++2b
-#define __cpp_lib_adaptor_iterator_pair_constructor 202100L
+#define __cpp_lib_adaptor_iterator_pair_constructor 202106L
 #define __cpp_lib_invoke_r 202106L
 #define __cpp_lib_is_scoped_enum 202011L
 #define __cpp_lib_string_contains 202011L
diff --git a/libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc b/libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc
index de0fc310c24..b826e745988 100644
--- a/libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc
+++ b/libstdc++-v3/testsuite/23_containers/queue/cons_from_iters.cc
@@ -22,7 +22,7 @@ 
 
 #ifndef __cpp_lib_adaptor_iterator_pair_constructor
 #error Feature test macro for iterator pair constructors is missing in <queue>
-#elif __cpp_lib_adaptor_iterator_pair_constructor != 202100L
+#elif __cpp_lib_adaptor_iterator_pair_constructor != 202106L
 #error Feature test macro for iterator pair constructors has wrong value in <queue>
 #endif
 
diff --git a/libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc b/libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc
index 4c648926d62..ee06679d986 100644
--- a/libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc
+++ b/libstdc++-v3/testsuite/23_containers/stack/cons_from_iters.cc
@@ -22,7 +22,7 @@ 
 
 #ifndef __cpp_lib_adaptor_iterator_pair_constructor
 #error Feature test macro for iterator pair constructors is missing in <stack>
-#elif __cpp_lib_adaptor_iterator_pair_constructor != 202100L
+#elif __cpp_lib_adaptor_iterator_pair_constructor != 202106L
 #error Feature test macro for iterator pair constructors has wrong value in <stack>
 #endif