From: Jonathan Wakely Date: Tue, 27 May 2025 15:54:52 +0000 (+0100) Subject: libstdc++: Remove redundant macro checks in std.cc.in X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=036660001db4d38cbd1bc13471714e696fba4e1b;p=thirdparty%2Fgcc.git libstdc++: Remove redundant macro checks in std.cc.in __cpp_lib_any and __cpp_lib_chrono are defined unconditionally in C++20 and __cpp_lib_three_way_comparison and __cpp_lib_concepts depend on front-end features which are definitely supported by GCC trunk and all non-GCC compilers we care about. libstdc++-v3/ChangeLog: * src/c++23/std.cc.in: Remove redundant checks for feature test macros that are always true. Reviewed-by: Tomasz KamiƄski --- diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstdc++-v3/src/c++23/std.cc.in index ba468530338..eddd3c839b0 100644 --- a/libstdc++-v3/src/c++23/std.cc.in +++ b/libstdc++-v3/src/c++23/std.cc.in @@ -511,7 +511,6 @@ export namespace std } // 22.7.2 -#if __cpp_lib_any export namespace std { using std::any; @@ -520,7 +519,6 @@ export namespace std using std::make_any; using std::swap; } -#endif // 24.3.2 export namespace std @@ -698,7 +696,6 @@ export namespace std } // 29.2 -#if __cpp_lib_chrono export namespace std { namespace chrono @@ -852,7 +849,6 @@ export namespace std::inline literals::inline chrono_literals export namespace std::chrono { using namespace literals::chrono_literals; } -#endif // __cpp_lib_chrono // : deprecated C++17, removed C++26 export namespace std @@ -864,7 +860,6 @@ export namespace std } // 17.11.1 -#if __cpp_lib_three_way_comparison export namespace std { using std::common_comparison_category; @@ -890,7 +885,6 @@ export namespace std using std::strong_order; using std::weak_order; } -#endif // __cpp_lib_three_way_comparison // 28.4 export namespace std @@ -944,7 +938,6 @@ export namespace std::inline literals::inline complex_literals } // 18 -#if __cpp_lib_concepts export namespace std { using std::assignable_from; @@ -983,7 +976,6 @@ export namespace std using std::totally_ordered; using std::totally_ordered_with; } -#endif // 33.7 export namespace std