https://gcc.gnu.org/g:036660001db4d38cbd1bc13471714e696fba4e1b

commit r16-1073-g036660001db4d38cbd1bc13471714e696fba4e1b
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue May 27 16:54:52 2025 +0100

    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 <tkami...@redhat.com>

Diff:
---
 libstdc++-v3/src/c++23/std.cc.in | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstdc++-v3/src/c++23/std.cc.in
index ba468530338f..eddd3c839b06 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 <any>
-#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 <array>
 export namespace std
@@ -698,7 +696,6 @@ export namespace std
 }
 
 // 29.2 <chrono>
-#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
 
 // <codecvt>: deprecated C++17, removed C++26
 export namespace std
@@ -864,7 +860,6 @@ export namespace std
 }
 
 // 17.11.1 <compare>
-#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 <complex>
 export namespace std
@@ -944,7 +938,6 @@ export namespace std::inline literals::inline 
complex_literals
 }
 
 // 18 <concepts>
-#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 <condition_variable>
 export namespace std

Reply via email to