[gcc r15-8485] libstdc++: Add views::cache_latest and views::to_input to std module
Jonathan Wakely
redi@gcc.gnu.org
Fri Mar 21 09:34:05 GMT 2025
https://gcc.gnu.org/g:ced873be918186a98d69dcdd89bb0240973b0f1a
commit r15-8485-gced873be918186a98d69dcdd89bb0240973b0f1a
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Mar 20 18:48:20 2025 +0000
libstdc++: Add views::cache_latest and views::to_input to std module
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.
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
Diff:
---
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 c0b7e1dc7271..12253b95c5a5 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>
More information about the Gcc-cvs
mailing list