diff options
Diffstat (limited to 'libcxx/include')
-rw-r--r-- | libcxx/include/__ranges/iota_view.h | 9 | ||||
-rw-r--r-- | libcxx/include/ranges | 5 | ||||
-rw-r--r-- | libcxx/include/version | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/libcxx/include/__ranges/iota_view.h b/libcxx/include/__ranges/iota_view.h index 32ff340..22adc22 100644 --- a/libcxx/include/__ranges/iota_view.h +++ b/libcxx/include/__ranges/iota_view.h @@ -393,6 +393,15 @@ struct __fn { inline namespace __cpo { inline constexpr auto iota = __iota::__fn{}; } // namespace __cpo + +# if _LIBCPP_STD_VER >= 26 + +inline constexpr auto indices = [](__integer_like auto __size) static { + return ranges::views::iota(decltype(__size){}, __size); +}; + +# endif + } // namespace views } // namespace ranges diff --git a/libcxx/include/ranges b/libcxx/include/ranges index 96d7a6b..cfaa66a 100644 --- a/libcxx/include/ranges +++ b/libcxx/include/ranges @@ -267,6 +267,11 @@ namespace std::ranges { template<class W, class Bound> inline constexpr bool enable_borrowed_range<iota_view<W, Bound>> = true; + namespace views { + inline constexpr unspecified iota = unspecified; + inline constexpr unspecified indices = unspecified; // Since C++26 + } + // [range.repeat], repeat view template<class T> concept integer-like-with-usable-difference-type = // exposition only diff --git a/libcxx/include/version b/libcxx/include/version index a132f08..99e6929 100644 --- a/libcxx/include/version +++ b/libcxx/include/version @@ -205,6 +205,7 @@ __cpp_lib_ranges_chunk_by 202202L <ranges> __cpp_lib_ranges_concat 202403L <ranges> __cpp_lib_ranges_contains 202207L <algorithm> __cpp_lib_ranges_find_last 202207L <algorithm> +__cpp_lib_ranges_indices 202506L <ranges> __cpp_lib_ranges_iota 202202L <numeric> __cpp_lib_ranges_join_with 202202L <ranges> __cpp_lib_ranges_repeat 202207L <ranges> @@ -591,6 +592,7 @@ __cpp_lib_void_t 201411L <type_traits> # define __cpp_lib_out_ptr 202311L // # define __cpp_lib_philox_engine 202406L // # define __cpp_lib_ranges_concat 202403L +# define __cpp_lib_ranges_indices 202506L # define __cpp_lib_ratio 202306L // # define __cpp_lib_rcu 202306L # define __cpp_lib_reference_wrapper 202403L |