The <compare> header is always supported, not only for hosted configs.

        * include/std/version (__cpp_lib_three_way_comparison): Define for
        freestanding builds.

Tested powerpc64le-linux, committed to master.


commit a2dcb56c9443d1211e14889bd0c2c21360d54cdb
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Thu Apr 23 21:39:33 2020 +0100

    libstdc++: Define __cpp_lib_three_way_comparison for freestanding
    
    The <compare> header is always supported, not only for hosted configs.
    
            * include/std/version (__cpp_lib_three_way_comparison): Define for
            freestanding builds.

diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version
index d06d60c9106..1beb9aa938e 100644
--- a/libstdc++-v3/include/std/version
+++ b/libstdc++-v3/include/std/version
@@ -184,6 +184,9 @@
 #endif
 #define __cpp_lib_is_nothrow_convertible 201806L
 #define __cpp_lib_remove_cvref 201711L
+#if __cpp_impl_three_way_comparison >= 201907L && __cpp_lib_concepts
+# define __cpp_lib_three_way_comparison 201907L
+#endif
 #define __cpp_lib_type_identity 201806L
 #define __cpp_lib_unwrap_ref 201811L
 
@@ -215,9 +218,6 @@
 #define __cpp_lib_span 202002L
 #define __cpp_lib_ssize 201902L
 #define __cpp_lib_starts_ends_with 201711L
-#if __cpp_impl_three_way_comparison >= 201907L && __cpp_lib_concepts
-# define __cpp_lib_three_way_comparison 201907L
-#endif
 #define __cpp_lib_to_address 201711L
 #define __cpp_lib_to_array 201907L
 #endif

Reply via email to