On Mon, Jun 2, 2025 at 7:25 PM Jonathan Wakely <jwak...@redhat.com> wrote:

> __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.
>
> libstdc++-v3/ChangeLog:
>
>         * src/c++23/std.cc.in: Remove redundant checks for feature test
>         macros that are always true.
> ---
>
> Tested x86_64-linux.
>
LGTM. I confirmed that clang defines language macros
that __cpp_lib_three_way_comparison depends on since release 10:
__cpp_impl_three_way_comparison >= 201907L   && __cpp_concepts >= 201907L

>
>  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
> --
> 2.49.0
>
>

Reply via email to