On Thu, Mar 20, 2025 at 8:19 PM Jonathan Wakely <jwak...@redhat.com> wrote:

> Also export the tuple-like helpers from <complex>, and the
> std::from_range_t and std::from_range tag.
>
> libstdc++-v3/ChangeLog:
>
>         * src/c++23/std.cc.in (tuple_element, tuple_element_t)
>         (tuple_size, tuple_size_v, get): Export.
>         (ranges::cache_latest_view, views::cache_latest): Export.
>         (ranges::to_input_view, views::to_input): Export.
>         (from_range_t, from_range): Export.
> ---
>
> Tested by compiling and importing std and briefly testing the imported
> features.
>
LGTM

>
>  libstdc++-v3/src/c++23/std.cc.in | 23 ++++++++++++++++++++---
>  1 file changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstdc++-v3/src/c++23/
> std.cc.in
> index c0b7e1dc727..12253b95c5a 100644
> --- a/libstdc++-v3/src/c++23/std.cc.in
> +++ b/libstdc++-v3/src/c++23/std.cc.in
> @@ -924,6 +924,13 @@ export namespace std
>    using std::sqrt;
>    using std::tan;
>    using std::tanh;
> +#if __cpp_lib_tuple_like >= 202311L
> +  using std::tuple_element;
> +  using std::tuple_element_t;
> +  using std::tuple_size;
> +  using std::tuple_size_v;
> +  using std::get;
> +#endif
>  }
>  export namespace std::inline literals::inline complex_literals
>  {
> @@ -2383,14 +2390,24 @@ export namespace std
>      using ranges::enumerate_view;
>      namespace views { using views::enumerate; }
>  #endif
> -#if __cpp_lib_ranges_to_container // C++ >= 23
> -    using ranges::to;
> -#endif // __cpp_lib_ranges_to_container
>  #if __cpp_lib_ranges_concat // C++ >= C++26
>      using ranges::concat_view;
>      namespace views { using views::concat; }
> +#endif
> +#if __cpp_lib_ranges_cache_latest // C++ >= C++26
> +    using ranges::cache_latest_view;
> +    namespace views { using views::cache_latest; }
> +#endif
> +#if __glibcxx_ranges_to_input // C++ >= 26
> +    using ranges::to_input_view;
> +    namespace views { using views::to_input; }
>  #endif
>    }
> +#if __glibcxx_ranges_to_container // C++ >= 23
> +  namespace ranges { using ranges::to; }
> +  using std::from_range_t;
> +  using std::from_range;
> +#endif
>  }
>
>  // <ratio>
> --
> 2.49.0
>
>

Reply via email to