From patchwork Fri Jan 21 16:10:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 50312 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 76BC63857809 for ; Fri, 21 Jan 2022 16:12:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76BC63857809 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1642781576; bh=QWP6cRZz01gzWGWJWt7O95kbwZONbTzGrrzZBj2r3ag=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=LTYLrSuZZTr39YQ+QbGDw2T9vG19AbBpPWQqhWFzKpazlK8H/RD8nyUGhlV9PvlqU 4Ea+pveocosGAq8YWDnTVU+qJfT9Z3oYVLb0RiT7YlO7KozbXUViNDqPfWPrhibVUQ JvEjj4hOsCOgRIn1q4zsYm2LzZxkd1ZVc0ENK6ts= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 7F6553857C6B for ; Fri, 21 Jan 2022 16:10:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F6553857C6B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-157-GxvSt0s3MgeVg0Szye_YPA-1; Fri, 21 Jan 2022 11:10:11 -0500 X-MC-Unique: GxvSt0s3MgeVg0Szye_YPA-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 4123951082; Fri, 21 Jan 2022 16:10:10 +0000 (UTC) Received: from localhost (unknown [10.33.36.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BA468464F; Fri, 21 Jan 2022 16:10:09 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Ensure all feature test macros have type long [PR87193] Date: Fri, 21 Jan 2022 16:10:08 +0000 Message-Id: <20220121161008.211703-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.9 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_H3, RCVD_IN_MSPIKE_WL, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Tested powerpc64le-linux, pushed to trunk. This defines all the __cpp_lib_xxx macros as type long, as required by the standard. We had an inconsistent mix of int and long, sometimes even for the same macro name. The __cpp_lib_experimental_xxx macros are left as type int, because that's what it says in the relevant TS specs. libstdc++-v3/ChangeLog: PR libstdc++/87193 PR libstdc++/104019 * include/bits/alloc_traits.h (__cpp_lib_allocator_traits_is_always_equal): Define as type long. * include/bits/allocator.h (__cpp_lib_incomplete_container_elements): Likewise. * include/bits/basic_string.h (__cpp_lib_string_udls): Likewise. * include/bits/chrono.h (__cpp_lib_chrono): Likewise. (__cpp_lib_chrono_udls): Likewise. * include/bits/move.h (__cpp_lib_addressof_constexpr): Likewise. * include/bits/node_handle.h (__cpp_lib_node_extract): Likewise. * include/bits/range_access.h (__cpp_lib_nonmember_container_access): Likewise. * include/bits/shared_ptr.h (__cpp_lib_enable_shared_from_this): Likewise. * include/bits/stl_algo.h (__cpp_lib_clamp): Likewise. (__cpp_lib_sample): Likewise. * include/bits/stl_algobase.h (__cpp_lib_robust_nonmodifying_seq_ops): Likewise. * include/bits/stl_function.h (__cpp_lib_transparent_operators): Likewise. * include/bits/stl_iterator.h (__cpp_lib_make_reverse_iterator): Likewise. * include/bits/stl_map.h (__cpp_lib_map_try_emplace): Likewise. * include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup): Likewise. * include/bits/unique_ptr.h (__cpp_lib_make_unique): Likewise. * include/bits/unordered_map.h (__cpp_lib_unordered_map_try_emplace): Likewise. * include/c_global/cmath (__cpp_lib_hypot): Likewise. * include/c_global/cstddef (__cpp_lib_byte): Likewise. * include/std/atomic (__cpp_lib_atomic_is_always_lock_free): Likewise. * include/std/complex (__cpp_lib_complex_udls): Likewise. * include/std/filesystem (__cpp_lib_filesystem): Likewise. * include/std/functional (__cpp_lib_not_fn): Likewise. (__cpp_lib_boyer_moore_searcher): Likewise. * include/std/iomanip (__cpp_lib_quoted_string_io): Likewise. * include/std/mutex (__cpp_lib_scoped_lock): Likewise. * include/std/numeric (__cpp_lib_gcd_lcm): Likewise. (__cpp_lib_gcd, __cpp_lib_lcm): Likewise. * include/std/tuple (__cpp_lib_apply): Likewise. (__cpp_lib_make_from_tuple): Likewise. * include/std/type_traits (__cpp_lib_integral_constant_callable) (__cpp_lib_bool_constant, __cpp_lib_logical_traits) (__cpp_lib_is_null_pointer, __cpp_lib_transformation_trait_aliases) (__cpp_lib_result_of_sfinae, __cpp_lib_void_t) (__cpp_lib_is_swappable, __cpp_lib_is_invocable) (__cpp_lib_has_unique_object_representations) (__cpp_lib_is_aggregate): Likewise. * include/std/version: Likewise. * libsupc++/new (__cpp_lib_launder): Likewise. --- libstdc++-v3/include/bits/alloc_traits.h | 2 +- libstdc++-v3/include/bits/allocator.h | 2 +- libstdc++-v3/include/bits/basic_string.h | 2 +- libstdc++-v3/include/bits/chrono.h | 4 +- libstdc++-v3/include/bits/move.h | 2 +- libstdc++-v3/include/bits/node_handle.h | 2 +- libstdc++-v3/include/bits/range_access.h | 2 +- libstdc++-v3/include/bits/shared_ptr.h | 2 +- libstdc++-v3/include/bits/stl_algo.h | 4 +- libstdc++-v3/include/bits/stl_algobase.h | 2 +- libstdc++-v3/include/bits/stl_function.h | 2 +- libstdc++-v3/include/bits/stl_iterator.h | 2 +- libstdc++-v3/include/bits/stl_map.h | 2 +- libstdc++-v3/include/bits/stl_tree.h | 2 +- libstdc++-v3/include/bits/unique_ptr.h | 2 +- libstdc++-v3/include/bits/unordered_map.h | 2 +- libstdc++-v3/include/c_global/cmath | 2 +- libstdc++-v3/include/c_global/cstddef | 2 +- libstdc++-v3/include/std/atomic | 2 +- libstdc++-v3/include/std/complex | 2 +- libstdc++-v3/include/std/filesystem | 2 +- libstdc++-v3/include/std/functional | 4 +- libstdc++-v3/include/std/iomanip | 2 +- libstdc++-v3/include/std/mutex | 2 +- libstdc++-v3/include/std/numeric | 6 +- libstdc++-v3/include/std/tuple | 4 +- libstdc++-v3/include/std/type_traits | 22 ++--- libstdc++-v3/include/std/version | 100 +++++++++++----------- libstdc++-v3/libsupc++/new | 2 +- 29 files changed, 94 insertions(+), 94 deletions(-) diff --git a/libstdc++-v3/include/bits/alloc_traits.h b/libstdc++-v3/include/bits/alloc_traits.h index fa93feb7198..a4d06d3fc7a 100644 --- a/libstdc++-v3/include/bits/alloc_traits.h +++ b/libstdc++-v3/include/bits/alloc_traits.h @@ -43,7 +43,7 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L -#define __cpp_lib_allocator_traits_is_always_equal 201411 +#define __cpp_lib_allocator_traits_is_always_equal 201411L /// @cond undocumented struct __allocator_traits_base diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h index ef735f49533..e0c322b5941 100644 --- a/libstdc++-v3/include/bits/allocator.h +++ b/libstdc++-v3/include/bits/allocator.h @@ -49,7 +49,7 @@ #include #endif -#define __cpp_lib_incomplete_container_elements 201505 +#define __cpp_lib_incomplete_container_elements 201505L namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index fc6a303a957..c3fbc53953c 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -4309,7 +4309,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201402L -#define __cpp_lib_string_udls 201304 +#define __cpp_lib_string_udls 201304L inline namespace literals { diff --git a/libstdc++-v3/include/bits/chrono.h b/libstdc++-v3/include/bits/chrono.h index ed0e32867d6..421898516ae 100644 --- a/libstdc++-v3/include/bits/chrono.h +++ b/libstdc++-v3/include/bits/chrono.h @@ -327,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // C++20 #if __cplusplus >= 201703L -# define __cpp_lib_chrono 201611 +# define __cpp_lib_chrono 201611L template constexpr __enable_if_is_duration<_ToDur> @@ -1198,7 +1198,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } // namespace chrono #if __cplusplus >= 201402L - #define __cpp_lib_chrono_udls 201304 +#define __cpp_lib_chrono_udls 201304L inline namespace literals { diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h index 3697353d94b..af473542628 100644 --- a/libstdc++-v3/include/bits/move.h +++ b/libstdc++-v3/include/bits/move.h @@ -130,7 +130,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus > 201402L // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2296. std::addressof should be constexpr -# define __cpp_lib_addressof_constexpr 201603 +# define __cpp_lib_addressof_constexpr 201603L #endif /** * @brief Returns the actual address of the object or function diff --git a/libstdc++-v3/include/bits/node_handle.h b/libstdc++-v3/include/bits/node_handle.h index fca3585c224..d7a7a30c839 100644 --- a/libstdc++-v3/include/bits/node_handle.h +++ b/libstdc++-v3/include/bits/node_handle.h @@ -34,7 +34,7 @@ #pragma GCC system_header #if __cplusplus >= 201703L -# define __cpp_lib_node_extract 201606 +# define __cpp_lib_node_extract 201606L #include #include diff --git a/libstdc++-v3/include/bits/range_access.h b/libstdc++-v3/include/bits/range_access.h index 62890fc0128..78fdfe66035 100644 --- a/libstdc++-v3/include/bits/range_access.h +++ b/libstdc++-v3/include/bits/range_access.h @@ -252,7 +252,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // C++14 #if __cplusplus >= 201703L -#define __cpp_lib_nonmember_container_access 201411 +#define __cpp_lib_nonmember_container_access 201411L /** * @brief Return the size of a container. diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h index f44008ed2b1..eb828dc35a8 100644 --- a/libstdc++-v3/include/bits/shared_ptr.h +++ b/libstdc++-v3/include/bits/shared_ptr.h @@ -939,7 +939,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return shared_ptr(this->_M_weak_this); } #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 -#define __cpp_lib_enable_shared_from_this 201603 +#define __cpp_lib_enable_shared_from_this 201603L /** @{ * Get a `weak_ptr` referring to the object that has `*this` as its base. * @since C++17 diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index 171b877dddf..1f07b9e6589 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -3603,7 +3603,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201703L -#define __cpp_lib_clamp 201603 +#define __cpp_lib_clamp 201603L /** * @brief Returns the value clamped between lo and hi. @@ -5858,7 +5858,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO } #if __cplusplus > 201402L -#define __cpp_lib_sample 201603 +#define __cpp_lib_sample 201603L /// Take a random sample from a population. template diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index 2e9665b56fb..84a1f9e98f6 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -1645,7 +1645,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO #if __cplusplus > 201103L -#define __cpp_lib_robust_nonmodifying_seq_ops 201304 +#define __cpp_lib_robust_nonmodifying_seq_ops 201304L /** * @brief Tests a range for element-wise equality. diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/bits/stl_function.h index 25badd5988a..fee07b27c27 100644 --- a/libstdc++-v3/include/bits/stl_function.h +++ b/libstdc++-v3/include/bits/stl_function.h @@ -243,7 +243,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus > 201103L -#define __cpp_lib_transparent_operators 201510 +#define __cpp_lib_transparent_operators 201510L template<> struct plus diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index 266ddd02a78..6a9fd1ba48e 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -639,7 +639,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return reverse_iterator<_Iterator>(__i); } # if __cplusplus >= 201402L -# define __cpp_lib_make_reverse_iterator 201402 +# define __cpp_lib_make_reverse_iterator 201402L // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 2285. make_reverse_iterator diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index 625760d0c29..9c2b0745673 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -695,7 +695,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #endif // C++17 #if __cplusplus > 201402L -#define __cpp_lib_map_try_emplace 201411 +#define __cpp_lib_map_try_emplace 201411L /** * @brief Attempts to build and insert a std::pair into the %map. * diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index e9e71bd2b56..a4de6141765 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -77,7 +77,7 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus > 201103L -# define __cpp_lib_generic_associative_lookup 201304 +# define __cpp_lib_generic_associative_lookup 201304L #endif // Red-black tree class, designed for use in implementing STL diff --git a/libstdc++-v3/include/bits/unique_ptr.h b/libstdc++-v3/include/bits/unique_ptr.h index 47796b8384f..8f4430f61f5 100644 --- a/libstdc++-v3/include/bits/unique_ptr.h +++ b/libstdc++-v3/include/bits/unique_ptr.h @@ -945,7 +945,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { }; #if __cplusplus >= 201402L -#define __cpp_lib_make_unique 201304 +#define __cpp_lib_make_unique 201304L /// @cond undocumented namespace __detail diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h index 366ba7c305f..d5edfde8caf 100644 --- a/libstdc++-v3/include/bits/unordered_map.h +++ b/libstdc++-v3/include/bits/unordered_map.h @@ -443,7 +443,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER insert(const_iterator, node_type&& __nh) { return _M_h._M_reinsert_node(std::move(__nh)).position; } -#define __cpp_lib_unordered_map_try_emplace 201411 +#define __cpp_lib_unordered_map_try_emplace 201411L /** * @brief Attempts to build and insert a std::pair into the * %unordered_map. diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath index 651e6546570..1b993f30330 100644 --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -1847,7 +1847,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201703L // [c.math.hypot3], three-dimensional hypotenuse -#define __cpp_lib_hypot 201603 +#define __cpp_lib_hypot 201603L template inline _Tp diff --git a/libstdc++-v3/include/c_global/cstddef b/libstdc++-v3/include/c_global/cstddef index b541895e5a1..4970c2dfcfb 100644 --- a/libstdc++-v3/include/c_global/cstddef +++ b/libstdc++-v3/include/c_global/cstddef @@ -63,7 +63,7 @@ namespace std namespace std { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#define __cpp_lib_byte 201603 +#define __cpp_lib_byte 201603L /// std::byte enum class byte : unsigned char {}; diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic index 9df17704f7e..bc57659b6e7 100644 --- a/libstdc++-v3/include/std/atomic +++ b/libstdc++-v3/include/std/atomic @@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ #if __cplusplus >= 201703L -# define __cpp_lib_atomic_is_always_lock_free 201603 +# define __cpp_lib_atomic_is_always_lock_free 201603L #endif template diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index f812cd2712e..8f9368fd7d0 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -1955,7 +1955,7 @@ inline namespace literals { inline namespace complex_literals { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wliteral-suffix" -#define __cpp_lib_complex_udls 201309 +#define __cpp_lib_complex_udls 201309L constexpr std::complex operator""if(long double __num) diff --git a/libstdc++-v3/include/std/filesystem b/libstdc++-v3/include/std/filesystem index 274aed690e2..dd112a254ad 100644 --- a/libstdc++-v3/include/std/filesystem +++ b/libstdc++-v3/include/std/filesystem @@ -46,7 +46,7 @@ #include #include -#define __cpp_lib_filesystem 201703 +#define __cpp_lib_filesystem 201703L #endif // C++17 diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index ee2a3e84366..685a3e167ee 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1062,7 +1062,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : true_type { }; // [func.not_fn] Function template not_fn -#define __cpp_lib_not_fn 201603 +#define __cpp_lib_not_fn 201603L /** Wrap a function object to create one that negates its result. * * The function template `std::not_fn` creates a "forwarding call wrapper", @@ -1085,7 +1085,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } // Searchers -#define __cpp_lib_boyer_moore_searcher 201603 +#define __cpp_lib_boyer_moore_searcher 201603L template> class default_searcher diff --git a/libstdc++-v3/include/std/iomanip b/libstdc++-v3/include/std/iomanip index 295d34b65e6..53716813993 100644 --- a/libstdc++-v3/include/std/iomanip +++ b/libstdc++-v3/include/std/iomanip @@ -448,7 +448,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201402L -#define __cpp_lib_quoted_string_io 201304 +#define __cpp_lib_quoted_string_io 201304L /** * @brief Manipulator for quoted strings. diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index c89a9d6741e..f500818d9c9 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -682,7 +682,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #if __cplusplus >= 201703L -#define __cpp_lib_scoped_lock 201703 +#define __cpp_lib_scoped_lock 201703L /** @brief A scoped lock type for multiple lockable objects. * * A scoped_lock controls mutex ownership within a scope, releasing diff --git a/libstdc++-v3/include/std/numeric b/libstdc++-v3/include/std/numeric index 3777ae0e554..5388239ef04 100644 --- a/libstdc++-v3/include/std/numeric +++ b/libstdc++-v3/include/std/numeric @@ -156,10 +156,10 @@ namespace __detail #if __cplusplus >= 201703L -#define __cpp_lib_gcd_lcm 201606 +#define __cpp_lib_gcd_lcm 201606L // These were used in drafts of SD-6: -#define __cpp_lib_gcd 201606 -#define __cpp_lib_lcm 201606 +#define __cpp_lib_gcd 201606L +#define __cpp_lib_lcm 201606L /// Greatest common divisor template diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index e6f26acc797..6d0060a191c 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -1843,7 +1843,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline constexpr bool __unpack_std_tuple<_Trait, _Tp, const tuple<_Up...>&> = _Trait<_Tp, const _Up&...>::value; -# define __cpp_lib_apply 201603 +# define __cpp_lib_apply 201603L template constexpr decltype(auto) @@ -1865,7 +1865,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Indices{}); } -#define __cpp_lib_make_from_tuple 201606 +#define __cpp_lib_make_from_tuple 201606L template constexpr _Tp diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 75f50e34a06..2572d8edd69 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -67,7 +67,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr operator value_type() const noexcept { return value; } #if __cplusplus > 201103L -#define __cpp_lib_integral_constant_callable 201304 +#define __cpp_lib_integral_constant_callable 201304L constexpr value_type operator()() const noexcept { return value; } #endif @@ -91,7 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// @endcond #if __cplusplus >= 201703L -# define __cpp_lib_bool_constant 201505 +# define __cpp_lib_bool_constant 201505L /// Alias template for compile-time boolean constant types. /// @since C++17 template @@ -188,7 +188,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline constexpr bool __and_v = __and_<_Bn...>::value; /// @endcond -#define __cpp_lib_logical_traits 201510 +#define __cpp_lib_logical_traits 201510L template struct conjunction @@ -548,7 +548,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct is_function<_Tp&&> : public false_type { }; -#define __cpp_lib_is_null_pointer 201309 +#define __cpp_lib_is_null_pointer 201309L template struct __is_null_pointer_helper @@ -1594,7 +1594,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus > 201103L -#define __cpp_lib_transformation_trait_aliases 201304 +#define __cpp_lib_transformation_trait_aliases 201304L /// Alias template for remove_const template @@ -2403,7 +2403,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Sfinae-friendly result_of implementation: -#define __cpp_lib_result_of_sfinae 201210 +#define __cpp_lib_result_of_sfinae 201210L /// @cond undocumented struct __invoke_memfun_ref { }; @@ -2631,7 +2631,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // C++14 #if __cplusplus >= 201703L || !defined(__STRICT_ANSI__) // c++17 or gnu++11 -#define __cpp_lib_void_t 201411 +#define __cpp_lib_void_t 201411L /// A metafunction that always yields void, used for detecting valid types. template using void_t = void; #endif @@ -2768,7 +2768,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// @endcond #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 -#define __cpp_lib_is_swappable 201603 +#define __cpp_lib_is_swappable 201603L /// Metafunctions used for detecting swappable types: p0185r1 /// is_swappable @@ -3015,7 +3015,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// @endcond #if __cplusplus >= 201703L -# define __cpp_lib_is_invocable 201703 +# define __cpp_lib_is_invocable 201703L /// std::invoke_result template @@ -3296,7 +3296,7 @@ template /// @} #ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP -# define __cpp_lib_has_unique_object_representations 201606 +# define __cpp_lib_has_unique_object_representations 201606L /// has_unique_object_representations /// @since C++17 template @@ -3316,7 +3316,7 @@ template #endif #ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE -# define __cpp_lib_is_aggregate 201703 +# define __cpp_lib_is_aggregate 201703L /// is_aggregate /// @since C++17 template diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index 64759c9bf24..30e04b55555 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -36,7 +36,7 @@ // c++03 #if _GLIBCXX_HOSTED -# define __cpp_lib_incomplete_container_elements 201505 +# define __cpp_lib_incomplete_container_elements 201505L #endif #if !defined(__STRICT_ANSI__) @@ -46,11 +46,11 @@ #if __cplusplus >= 201103L // c++11 -#define __cpp_lib_is_null_pointer 201309 -#define __cpp_lib_result_of_sfinae 201210 +#define __cpp_lib_is_null_pointer 201309L +#define __cpp_lib_result_of_sfinae 201210L #if _GLIBCXX_HOSTED -# define __cpp_lib_allocator_traits_is_always_equal 201411 +# define __cpp_lib_allocator_traits_is_always_equal 201411L #if __cplusplus <= 201703L // N.B. updated value in C++20 # define __cpp_lib_shared_ptr_arrays 201611L #endif @@ -58,10 +58,10 @@ #if !defined(__STRICT_ANSI__) // gnu++11 -# define __cpp_lib_is_swappable 201603 -# define __cpp_lib_void_t 201411 +# define __cpp_lib_is_swappable 201603L +# define __cpp_lib_void_t 201411L # if _GLIBCXX_HOSTED -# define __cpp_lib_enable_shared_from_this 201603 +# define __cpp_lib_enable_shared_from_this 201603L # endif #endif @@ -73,100 +73,100 @@ #if __cpp_impl_coroutine # define __cpp_lib_coroutine 201902L #endif -#define __cpp_lib_integral_constant_callable 201304 +#define __cpp_lib_integral_constant_callable 201304L #define __cpp_lib_is_final 201402L -#define __cpp_lib_transformation_trait_aliases 201304 +#define __cpp_lib_transformation_trait_aliases 201304L #if _GLIBCXX_HOSTED -# define __cpp_lib_chrono_udls 201304 -# define __cpp_lib_complex_udls 201309 -# define __cpp_lib_exchange_function 201304 -# define __cpp_lib_generic_associative_lookup 201304 -# define __cpp_lib_integer_sequence 201304 -# define __cpp_lib_make_reverse_iterator 201402 -# define __cpp_lib_make_unique 201304 +# define __cpp_lib_chrono_udls 201304L +# define __cpp_lib_complex_udls 201309L +# define __cpp_lib_exchange_function 201304L +# define __cpp_lib_generic_associative_lookup 201304L +# define __cpp_lib_integer_sequence 201304L +# define __cpp_lib_make_reverse_iterator 201402L +# define __cpp_lib_make_unique 201304L # ifndef _GLIBCXX_DEBUG // PR libstdc++/70303 # define __cpp_lib_null_iterators 201304L # endif -# define __cpp_lib_quoted_string_io 201304 -# define __cpp_lib_robust_nonmodifying_seq_ops 201304 +# define __cpp_lib_quoted_string_io 201304L +# define __cpp_lib_robust_nonmodifying_seq_ops 201304L # ifdef _GLIBCXX_HAS_GTHREADS # define __cpp_lib_shared_timed_mutex 201402L # endif -# define __cpp_lib_string_udls 201304 -# define __cpp_lib_transparent_operators 201510 +# define __cpp_lib_string_udls 201304L +# define __cpp_lib_transparent_operators 201510L # define __cpp_lib_tuple_element_t 201402L # define __cpp_lib_tuples_by_type 201304L #endif #if __cplusplus >= 201703L // c++17 -#define __cpp_lib_addressof_constexpr 201603 -#define __cpp_lib_atomic_is_always_lock_free 201603 -#define __cpp_lib_bool_constant 201505 -#define __cpp_lib_byte 201603 +#define __cpp_lib_addressof_constexpr 201603L +#define __cpp_lib_atomic_is_always_lock_free 201603L +#define __cpp_lib_bool_constant 201505L +#define __cpp_lib_byte 201603L #ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP -# define __cpp_lib_has_unique_object_representations 201606 +# define __cpp_lib_has_unique_object_representations 201606L #endif #ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE -# define __cpp_lib_is_aggregate 201703 +# define __cpp_lib_is_aggregate 201703L #endif -#define __cpp_lib_is_invocable 201703 -#define __cpp_lib_is_swappable 201603 +#define __cpp_lib_is_invocable 201703L +#define __cpp_lib_is_swappable 201603L #ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER -# define __cpp_lib_launder 201606 +# define __cpp_lib_launder 201606L #endif -#define __cpp_lib_logical_traits 201510 +#define __cpp_lib_logical_traits 201510L #define __cpp_lib_type_trait_variable_templates 201510L #define __cpp_lib_uncaught_exceptions 201411L -#define __cpp_lib_void_t 201411 +#define __cpp_lib_void_t 201411L #if _GLIBCXX_HOSTED #define __cpp_lib_any 201606L -#define __cpp_lib_apply 201603 +#define __cpp_lib_apply 201603L #if __cplusplus == 201703L // N.B. updated value in C++20 # define __cpp_lib_array_constexpr 201803L #endif -#define __cpp_lib_as_const 201510 -#define __cpp_lib_boyer_moore_searcher 201603 -#define __cpp_lib_chrono 201611 -#define __cpp_lib_clamp 201603 +#define __cpp_lib_as_const 201510L +#define __cpp_lib_boyer_moore_searcher 201603L +#define __cpp_lib_chrono 201611L +#define __cpp_lib_clamp 201603L #if __cplusplus == 201703L // N.B. updated value in C++20 # if _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED # define __cpp_lib_constexpr_char_traits 201611L # define __cpp_lib_constexpr_string 201611L # endif #endif -#define __cpp_lib_enable_shared_from_this 201603 +#define __cpp_lib_enable_shared_from_this 201603L #define __cpp_lib_execution 201902L // FIXME: should be 201603L -#define __cpp_lib_filesystem 201703 -#define __cpp_lib_gcd 201606 -#define __cpp_lib_gcd_lcm 201606 +#define __cpp_lib_filesystem 201703L +#define __cpp_lib_gcd 201606L +#define __cpp_lib_gcd_lcm 201606L #ifdef __GCC_DESTRUCTIVE_SIZE # define __cpp_lib_hardware_interference_size 201703L #endif -#define __cpp_lib_hypot 201603 +#define __cpp_lib_hypot 201603L #define __cpp_lib_invoke 201411L -#define __cpp_lib_lcm 201606 -#define __cpp_lib_make_from_tuple 201606 -#define __cpp_lib_map_try_emplace 201411 +#define __cpp_lib_lcm 201606L +#define __cpp_lib_make_from_tuple 201606L +#define __cpp_lib_map_try_emplace 201411L #define __cpp_lib_math_special_functions 201603L #ifdef _GLIBCXX_HAS_GTHREADS # define __cpp_lib_memory_resource 201603L #else # define __cpp_lib_memory_resource 1 #endif -#define __cpp_lib_node_extract 201606 -#define __cpp_lib_nonmember_container_access 201411 -#define __cpp_lib_not_fn 201603 +#define __cpp_lib_node_extract 201606L +#define __cpp_lib_nonmember_container_access 201411L +#define __cpp_lib_not_fn 201603L #if __cplusplus == 201703L // N.B. updated value in C++20 # define __cpp_lib_optional 201606L #endif #define __cpp_lib_parallel_algorithm 201603L #define __cpp_lib_raw_memory_algorithms 201606L -#define __cpp_lib_sample 201603 +#define __cpp_lib_sample 201603L #ifdef _GLIBCXX_HAS_GTHREADS -# define __cpp_lib_scoped_lock 201703 +# define __cpp_lib_scoped_lock 201703L # define __cpp_lib_shared_mutex 201505L #endif #define __cpp_lib_shared_ptr_weak_type 201606L @@ -174,7 +174,7 @@ #if _GLIBCXX_HAVE_USELOCALE # define __cpp_lib_to_chars 201611L #endif -#define __cpp_lib_unordered_map_try_emplace 201411 +#define __cpp_lib_unordered_map_try_emplace 201411L #ifndef _GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS // N.B. updated value in C++20 # define __cpp_lib_variant 202102L diff --git a/libstdc++-v3/libsupc++/new b/libstdc++-v3/libsupc++/new index 51604f18afb..ecd82f6b254 100644 --- a/libstdc++-v3/libsupc++/new +++ b/libstdc++-v3/libsupc++/new @@ -186,7 +186,7 @@ inline void operator delete[](void*, void*) _GLIBCXX_USE_NOEXCEPT { } namespace std { #ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER -#define __cpp_lib_launder 201606 +#define __cpp_lib_launder 201606L /// Pointer optimization barrier [ptr.launder] template [[nodiscard]] constexpr _Tp*