diff --git a/source/ranges.tex b/source/ranges.tex index ec99f49b5d..b5204c94a1 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -218,7 +218,10 @@ template constexpr bool @\libspec{enable_borrowed_range}{iota_view}@> = true; - namespace views { inline constexpr @\unspecnc@ iota = @\unspecnc@; } + namespace views { + inline constexpr @\unspecnc@ iota = @\unspecnc@; + inline constexpr @\unspecnc@ indices = @\unspecnc@; + } // \ref{range.repeat}, repeat view template<@\libconcept{move_constructible}@ T, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t> @@ -2802,6 +2805,17 @@ \end{codeblock} \end{example} +\pnum +\indexlibrarymember{indices}{views}% +The name \tcode{views::indices} denotes a +customization point object\iref{customization.point.object}. +Given subexpression \tcode{E}, +let \tcode{T} be \tcode{remove_cvref_t}. +\tcode{views::indices(E)} is expression-equivalent to +\tcode{views::iota(T(0), E)} +if \tcode{\exposid{is-integer-like}} is \tcode{true}, +and ill-formed otherwise. + \rSec3[range.iota.view]{Class template \tcode{iota_view}} \indexlibraryglobal{iota_view}% diff --git a/source/support.tex b/source/support.tex index a0d610fe54..9f4bb1eb77 100644 --- a/source/support.tex +++ b/source/support.tex @@ -794,6 +794,7 @@ #define @\defnlibxname{cpp_lib_ranges_find_last}@ 202207L // also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_ranges_fold}@ 202207L // also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_ranges_generate_random}@ 202403L // also in \libheader{random} +#define @\defnlibxname{cpp_lib_ranges_indices}@ 202506L // also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_iota}@ 202202L // also in \libheader{numeric} #define @\defnlibxname{cpp_lib_ranges_join_with}@ 202202L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_repeat}@ 202207L // freestanding, also in \libheader{ranges}