From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id AB7753954C45 for ; Wed, 22 Apr 2020 21:59:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AB7753954C45 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-182-C0wG8fo6NbiUGUysR54KMw-1; Wed, 22 Apr 2020 17:59:11 -0400 X-MC-Unique: C0wG8fo6NbiUGUysR54KMw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 83C371009445; Wed, 22 Apr 2020 21:59:10 +0000 (UTC) Received: from localhost (unknown [10.33.36.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BB7219C69; Wed, 22 Apr 2020 21:59:10 +0000 (UTC) Date: Wed, 22 Apr 2020 22:59:09 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed 6/8] libstdc++: Do not define __cpp_lib_constexpr_algorithms in Message-ID: <2025db692e9ed1192f831bc122413a226987515c.1587592482.git.jwakely@redhat.com> References: MIME-Version: 1.0 In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Status: No, score=-28.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Wed, 22 Apr 2020 21:59:15 -0000 The C++20 draft and SD-6 both say this should only be in and , not in . =09* include/std/utility (__cpp_lib_constexpr_algorithms): Do not define =09here. =09* testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be =09defined by . --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/std/utility | 8 ++------ libstdc++-v3/testsuite/20_util/exchange/constexpr.cc | 6 ------ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4e86ec188a5..4fec7b21029 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 2020-04-22 Jonathan Wakely =20 +=09* include/std/utility (__cpp_lib_constexpr_algorithms): Do not define +=09here. +=09* testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be +=09defined by . + =09* include/std/functional (__cpp_lib_concepts): Update macro value to =09indicate P1964R2 support. =09* include/std/version (__cpp_lib_concepts): Likewise. diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/ut= ility index dc6e8468af5..5f1675a7679 100644 --- a/libstdc++-v3/include/std/utility +++ b/libstdc++-v3/include/std/utility @@ -238,7 +238,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION get(const std::pair<_Tp1, _Tp2>&& __in) noexcept { return __pair_get<_Int>::__const_move_get(std::move(__in)); } =20 -#if __cplusplus > 201103L +#if __cplusplus >=3D 201402L =20 #define __cpp_lib_tuples_by_type 201304 =20 @@ -284,10 +284,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION =20 #define __cpp_lib_exchange_function 201304 =20 -#if __cplusplus > 201703L -# define __cpp_lib_constexpr_algorithms 201806L -#endif - /// Assign @p __new_val to @p __obj and return its previous value. template _GLIBCXX20_CONSTEXPR @@ -295,7 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION exchange(_Tp& __obj, _Up&& __new_val) { return std::__exchange(__obj, std::forward<_Up>(__new_val)); } =20 -#endif +#endif // C++14 =20 // Stores a tuple of indices. Used by tuple and pair, and by bind() to // extract the elements in a tuple. diff --git a/libstdc++-v3/testsuite/20_util/exchange/constexpr.cc b/libstdc= ++-v3/testsuite/20_util/exchange/constexpr.cc index 3673772ea4b..ee6cbaebdee 100644 --- a/libstdc++-v3/testsuite/20_util/exchange/constexpr.cc +++ b/libstdc++-v3/testsuite/20_util/exchange/constexpr.cc @@ -20,12 +20,6 @@ =20 #include =20 -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201806L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { --=20 2.25.3