From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 4EF89385843C for ; Tue, 5 Oct 2021 08:37:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4EF89385843C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-603-m9vrIg5-MJeWtvjQBxh8og-1; Tue, 05 Oct 2021 04:37:47 -0400 X-MC-Unique: m9vrIg5-MJeWtvjQBxh8og-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A9D651006AA9; Tue, 5 Oct 2021 08:37:46 +0000 (UTC) Received: from localhost (unknown [10.33.37.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5202D60853; Tue, 5 Oct 2021 08:37:46 +0000 (UTC) Date: Tue, 5 Oct 2021 09:37:45 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Update __cpp_lib_adaptor_iterator_pair_constructor value Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="ENrmxMvMd3yTr26f" Content-Disposition: inline X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2021 08:37:55 -0000 --ENrmxMvMd3yTr26f Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline 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 > >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. --ENrmxMvMd3yTr26f Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" commit 9e136807c5b5476ed02a2a40a14fe0df3c0f4f18 Author: Jonathan Wakely 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> 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> 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 -#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 #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 -#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 #endif --ENrmxMvMd3yTr26f--