[ranges.syn]

# 25 Ranges library [[ranges]](./#ranges)

## 25.2 Header <ranges> synopsis [ranges.syn]

[ð](#header:%3cranges%3e)

// mostly freestanding#include <compare> // see [[compare.syn]](compare.syn "17.12.1 Header <compare> synopsis")#include <initializer_list> // see [[initializer.list.syn]](initializer.list.syn "17.11.2 Header <initializer_­list> synopsis")#include <iterator> // see [[iterator.synopsis]](iterator.synopsis "24.2 Header <iterator>&nbsp;synopsis")namespace std::ranges {inline namespace *unspecified* {// [[range.access]](range.access "25.3 Range access"), range accessinline constexpr *unspecified* begin = *unspecified*; inline constexpr *unspecified* end = *unspecified*; inline constexpr *unspecified* cbegin = *unspecified*; inline constexpr *unspecified* cend = *unspecified*; inline constexpr *unspecified* rbegin = *unspecified*; inline constexpr *unspecified* rend = *unspecified*; inline constexpr *unspecified* crbegin = *unspecified*; inline constexpr *unspecified* crend = *unspecified*; inline constexpr *unspecified* size = *unspecified*; inline constexpr *unspecified* reserve_hint = *unspecified*; inline constexpr *unspecified* ssize = *unspecified*; inline constexpr *unspecified* empty = *unspecified*; inline constexpr *unspecified* data = *unspecified*; inline constexpr *unspecified* cdata = *unspecified*; }// [[range.range]](range.range "25.4.2 Ranges"), rangestemplate<class T>concept range = *see below*; template<class T>constexpr bool enable_borrowed_range = false; template<class T>concept borrowed_range = *see below*; template<class T>using iterator_t = decltype(ranges::begin(declval<T&>())); template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using sentinel_t = decltype(ranges::end(declval<R&>())); template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using const_iterator_t = decltype(ranges::cbegin(declval<R&>())); template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using const_sentinel_t = decltype(ranges::cend(declval<R&>())); template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using range_difference_t = iter_difference_t<iterator_t<R>>; template<[sized_range](range.sized#concept:sized_range "25.4.4 Sized ranges [range.sized]") R>using range_size_t = decltype(ranges::size(declval<R&>())); template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using range_value_t = iter_value_t<iterator_t<R>>; template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using range_reference_t = iter_reference_t<iterator_t<R>>; template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using range_const_reference_t = iter_const_reference_t<iterator_t<R>>; template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>; template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using range_common_reference_t = iter_common_reference_t<iterator_t<R>>; // [[range.sized]](range.sized "25.4.4 Sized ranges"), sized rangestemplate<class>constexpr bool disable_sized_range = false; template<class T>concept approximately_sized_range = *see below*; template<class T>concept sized_range = *see below*; // [[range.view]](range.view "25.4.5 Views"), viewstemplate<class T>constexpr bool enable_view = *see below*; struct view_base {}; template<class T>concept view = *see below*; // [[range.refinements]](range.refinements "25.4.6 Other range refinements"), other range refinementstemplate<class R, class T>concept output_range = *see below*; template<class T>concept input_range = *see below*; template<class T>concept forward_range = *see below*; template<class T>concept bidirectional_range = *see below*; template<class T>concept random_access_range = *see below*; template<class T>concept contiguous_range = *see below*; template<class T>concept common_range = *see below*; template<class T>concept viewable_range = *see below*; template<class T>concept constant_range = *see below*; template<class T>concept [*sized-random-access-range*](range.refinements#concept:sized-random-access-range "25.4.6 Other range refinements [range.refinements]") = *see below*; // *exposition only*// [[view.interface]](view.interface "25.5.3 View interface"), class template view_interfacetemplate<class D>requires is_class_v<D> && [same_as](concept.same#concept:same_as "18.4.2 Concept same_­as [concept.same]")<D, remove_cv_t<D>>class view_interface; // [[range.subrange]](range.subrange "25.5.4 Sub-ranges"), sub-rangesenum class [subrange_kind](#lib:subrange_kind "25.2 Header <ranges> synopsis [ranges.syn]") : bool { [unsized](#lib:subrange_kind,unsized "25.2 Header <ranges> synopsis [ranges.syn]"), [sized](#lib:subrange_kind,sized "25.2 Header <ranges> synopsis [ranges.syn]") }; template<[input_or_output_iterator](iterator.concept.iterator#concept:input_or_output_iterator "24.3.4.6 Concept input_­or_­output_­iterator [iterator.concept.iterator]") I, [sentinel_for](iterator.concept.sentinel#concept:sentinel_for "24.3.4.7 Concept sentinel_­for [iterator.concept.sentinel]")<I> S = I, subrange_kind K = *see below*>requires (K == subrange_kind::sized || ![sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<S, I>)class subrange; template<class I, class S, subrange_kind K>constexpr bool enable_borrowed_range<subrange<I, S, K>> = true; template<size_t N, class I, class S, subrange_kind K>requires ((N == 0 && [copyable](concepts.object#concept:copyable "18.6 Object concepts [concepts.object]")<I>) || N == 1)constexpr auto get(const subrange<I, S, K>& r); template<size_t N, class I, class S, subrange_kind K>requires (N < 2)constexpr auto get(subrange<I, S, K>&& r);}namespace std {using ranges::get;}namespace std::ranges {// [[range.dangling]](range.dangling "25.5.5 Dangling iterator handling"), dangling iterator handlingstruct dangling; // [[range.elementsof]](range.elementsof "25.5.6 Class template elements_­of"), class template elements_oftemplate<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R, class Allocator = allocator<byte>>struct elements_of; // hostedtemplate<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using borrowed_iterator_t = *see below*; template<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>using borrowed_subrange_t = *see below*; // [[range.utility.conv]](range.utility.conv "25.5.7 Range conversions"), range conversionstemplate<class C, [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") R, class... Args> requires (![view](range.view#concept:view "25.4.5 Views [range.view]")<C>)constexpr C to(R&& r, Args&&... args); template<template<class...> class C, [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") R, class... Args>constexpr auto to(R&& r, Args&&... args); template<class C, class... Args> requires (![view](range.view#concept:view "25.4.5 Views [range.view]")<C>)constexpr auto to(Args&&... args); template<template<class...> class C, class... Args>constexpr auto to(Args&&... args); // [[range.empty]](range.empty "25.6.2 Empty view"), empty viewtemplate<class T>requires is_object_v<T>class empty_view; template<class T>constexpr bool enable_borrowed_range<empty_view<T>> = true; namespace views {template<class T>constexpr empty_view<T> [empty](#lib:views,empty "25.2 Header <ranges> synopsis [ranges.syn]"){}; }// [[range.single]](range.single "25.6.3 Single view"), single viewtemplate<[move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_­constructible [concept.moveconstructible]") T>requires is_object_v<T>class single_view; namespace views { inline constexpr *unspecified* single = *unspecified*; }template<bool Const, class T>using *maybe-const* = conditional_t<Const, const T, T>; // *exposition only*// [[range.iota]](range.iota "25.6.4 Iota view"), iota viewtemplate<[weakly_incrementable](iterator.concept.winc#concept:weakly_incrementable "24.3.4.4 Concept weakly_­incrementable [iterator.concept.winc]") W, [semiregular](concepts.object#concept:semiregular "18.6 Object concepts [concepts.object]") Bound = unreachable_sentinel_t>requires [*weakly-equality-comparable-with*](concept.equalitycomparable#concept:weakly-equality-comparable-with "18.5.4 Concept equality_­comparable [concept.equalitycomparable]")<W, Bound> && [copyable](concepts.object#concept:copyable "18.6 Object concepts [concepts.object]")<W>class iota_view; template<class W, class Bound>constexpr bool enable_borrowed_range<iota_view<W, Bound>> = true; namespace views {inline constexpr *unspecified* iota = *unspecified*; inline constexpr *unspecified* indices = *unspecified*; }// [[range.repeat]](range.repeat "25.6.5 Repeat view"), repeat viewtemplate<[move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_­constructible [concept.moveconstructible]") T, [semiregular](concepts.object#concept:semiregular "18.6 Object concepts [concepts.object]") Bound = unreachable_sentinel_t>requires *see below*class repeat_view; namespace views { inline constexpr *unspecified* repeat = *unspecified*; }// [[range.istream]](range.istream "25.6.6 Istream view"), istream viewtemplate<[movable](concepts.object#concept:movable "18.6 Object concepts [concepts.object]") Val, class CharT, class Traits = char_traits<CharT>>requires *see below*class basic_istream_view; // hostedtemplate<class Val>using istream_view = basic_istream_view<Val, char>; // hostedtemplate<class Val>using wistream_view = basic_istream_view<Val, wchar_t>; // hostednamespace views {template<class T> constexpr *unspecified* istream = *unspecified*; // hosted}// [[range.adaptor.object]](range.adaptor.object "25.7.2 Range adaptor objects"), range adaptor objectstemplate<class D>requires is_class_v<D> && [same_as](concept.same#concept:same_as "18.4.2 Concept same_­as [concept.same]")<D, remove_cv_t<D>>class range_adaptor_closure { }; // [[range.all]](range.all "25.7.6 All view"), all viewnamespace views {inline constexpr *unspecified* all = *unspecified*; template<[viewable_range](range.refinements#concept:viewable_range "25.4.6 Other range refinements [range.refinements]") R>using all_t = decltype(all(declval<R>())); }// [[range.ref.view]](range.ref.view "25.7.6.2 Class template ref_­view"), ref viewtemplate<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>requires is_object_v<R>class ref_view; template<class T>constexpr bool enable_borrowed_range<ref_view<T>> = true; // [[range.owning.view]](range.owning.view "25.7.6.3 Class template owning_­view"), owning viewtemplate<[range](range.range#concept:range "25.4.2 Ranges [range.range]") R>requires *see below*class owning_view; template<class T>constexpr bool enable_borrowed_range<owning_view<T>> = enable_borrowed_range<T>; // [[range.as.rvalue]](range.as.rvalue "25.7.7 As rvalue view"), as rvalue viewtemplate<[view](range.view#concept:view "25.4.5 Views [range.view]") V>requires [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")<V>class as_rvalue_view; template<class T>constexpr bool enable_borrowed_range<as_rvalue_view<T>> = enable_borrowed_range<T>; namespace views { inline constexpr *unspecified* as_rvalue = *unspecified*; }// [[range.filter]](range.filter "25.7.8 Filter view"), filter viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V, [indirect_unary_predicate](indirectcallable.indirectinvocable#concept:indirect_unary_predicate "24.3.6.3 Indirect callables [indirectcallable.indirectinvocable]")<iterator_t<V>> Pred>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V> && is_object_v<Pred>class filter_view; namespace views { inline constexpr *unspecified* filter = *unspecified*; }// [[range.transform]](range.transform "25.7.9 Transform view"), transform viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V, [move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_­constructible [concept.moveconstructible]") F>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V> && is_object_v<F> &&[regular_invocable](concept.regularinvocable#concept:regular_invocable "18.7.3 Concept regular_­invocable [concept.regularinvocable]")<F&, range_reference_t<V>> &&[*can-reference*](iterator.synopsis#concept:can-reference "24.2 Header <iterator>&nbsp;synopsis [iterator.synopsis]")<invoke_result_t<F&, range_reference_t<V>>>class transform_view; namespace views { inline constexpr *unspecified* transform = *unspecified*; }// [[range.take]](range.take "25.7.10 Take view"), take viewtemplate<[view](range.view#concept:view "25.4.5 Views [range.view]")> class take_view; template<class T>constexpr bool enable_borrowed_range<take_view<T>> = enable_borrowed_range<T>; namespace views { inline constexpr *unspecified* take = *unspecified*; }// [[range.take.while]](range.take.while "25.7.11 Take while view"), take while viewtemplate<[view](range.view#concept:view "25.4.5 Views [range.view]") V, class Pred>requires [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")<V> && is_object_v<Pred> &&[indirect_unary_predicate](indirectcallable.indirectinvocable#concept:indirect_unary_predicate "24.3.6.3 Indirect callables [indirectcallable.indirectinvocable]")<const Pred, iterator_t<V>>class take_while_view; namespace views { inline constexpr *unspecified* take_while = *unspecified*; }// [[range.drop]](range.drop "25.7.12 Drop view"), drop viewtemplate<[view](range.view#concept:view "25.4.5 Views [range.view]") V>class drop_view; template<class T>constexpr bool enable_borrowed_range<drop_view<T>> = enable_borrowed_range<T>; namespace views { inline constexpr *unspecified* drop = *unspecified*; }// [[range.drop.while]](range.drop.while "25.7.13 Drop while view"), drop while viewtemplate<[view](range.view#concept:view "25.4.5 Views [range.view]") V, class Pred>requires [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")<V> && is_object_v<Pred> &&[indirect_unary_predicate](indirectcallable.indirectinvocable#concept:indirect_unary_predicate "24.3.6.3 Indirect callables [indirectcallable.indirectinvocable]")<const Pred, iterator_t<V>>class drop_while_view; template<class T, class Pred>constexpr bool enable_borrowed_range<drop_while_view<T, Pred>> = enable_borrowed_range<T>; namespace views { inline constexpr *unspecified* drop_while = *unspecified*; }// [[range.join]](range.join "25.7.14 Join view"), join viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V> && [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")<range_reference_t<V>>class join_view; namespace views { inline constexpr *unspecified* join = *unspecified*; }// [[range.join.with]](range.join.with "25.7.15 Join with view"), join with viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V, [forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]") Pattern>requires *see below*class join_with_view; namespace views { inline constexpr *unspecified* join_with = *unspecified*; }// [[range.lazy.split]](range.lazy.split "25.7.16 Lazy split view"), lazy split viewtemplate<class R>concept [*tiny-range*](range.lazy.split.view#concept:tiny-range "25.7.16.2 Class template lazy_­split_­view [range.lazy.split.view]") = *see below*; // *exposition only*template<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V, [forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]") Pattern>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V> && [view](range.view#concept:view "25.4.5 Views [range.view]")<Pattern> &&[indirectly_comparable](alg.req.ind.cmp#concept:indirectly_comparable "24.3.7.5 Concept indirectly_­comparable [alg.req.ind.cmp]")<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&([forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]")<V> || [*tiny-range*](range.lazy.split.view#concept:tiny-range "25.7.16.2 Class template lazy_­split_­view [range.lazy.split.view]")<Pattern>)class lazy_split_view; // [[range.split]](range.split "25.7.17 Split view"), split viewtemplate<[forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]") V, [forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]") Pattern>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V> && [view](range.view#concept:view "25.4.5 Views [range.view]")<Pattern> &&[indirectly_comparable](alg.req.ind.cmp#concept:indirectly_comparable "24.3.7.5 Concept indirectly_­comparable [alg.req.ind.cmp]")<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>class split_view; namespace views {inline constexpr *unspecified* lazy_split = *unspecified*; inline constexpr *unspecified* split = *unspecified*; }// [[range.concat]](range.concat "25.7.18 Concat view"), concat viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")... Views>requires *see below*class concat_view; namespace views { inline constexpr *unspecified* concat = *unspecified*; }// [[range.counted]](range.counted "25.7.19 Counted view"), counted viewnamespace views { inline constexpr *unspecified* counted = *unspecified*; }// [[range.common]](range.common "25.7.20 Common view"), common viewtemplate<[view](range.view#concept:view "25.4.5 Views [range.view]") V>requires (![common_range](range.refinements#concept:common_range "25.4.6 Other range refinements [range.refinements]")<V> && [copyable](concepts.object#concept:copyable "18.6 Object concepts [concepts.object]")<iterator_t<V>>)class common_view; template<class T>constexpr bool enable_borrowed_range<common_view<T>> = enable_borrowed_range<T>; namespace views { inline constexpr *unspecified* common = *unspecified*; }// [[range.reverse]](range.reverse "25.7.21 Reverse view"), reverse viewtemplate<[view](range.view#concept:view "25.4.5 Views [range.view]") V>requires [bidirectional_range](range.refinements#concept:bidirectional_range "25.4.6 Other range refinements [range.refinements]")<V>class reverse_view; template<class T>constexpr bool enable_borrowed_range<reverse_view<T>> = enable_borrowed_range<T>; namespace views { inline constexpr *unspecified* reverse = *unspecified*; }// [[range.as.const]](range.as.const "25.7.22 As const view"), as const viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") R>constexpr auto& *possibly-const-range*(R& r) noexcept { // *exposition only*if constexpr ([input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")<const R>) {return const_cast<const R&>(r); } else {return r; }}template<[view](range.view#concept:view "25.4.5 Views [range.view]") V>requires [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")<V>class as_const_view; template<class T>constexpr bool enable_borrowed_range<as_const_view<T>> = enable_borrowed_range<T>; namespace views { inline constexpr *unspecified* as_const = *unspecified*; }// [[range.elements]](range.elements "25.7.23 Elements view"), elements viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V, size_t N>requires *see below*class elements_view; template<class T, size_t N>constexpr bool enable_borrowed_range<elements_view<T, N>> = enable_borrowed_range<T>; template<class R>using [keys_view](#lib:keys_view "25.2 Header <ranges> synopsis [ranges.syn]") = elements_view<R, 0>; template<class R>using [values_view](#lib:values_view "25.2 Header <ranges> synopsis [ranges.syn]") = elements_view<R, 1>; namespace views {template<size_t N>constexpr *unspecified* elements = *unspecified*; inline constexpr auto [keys](#lib:views,keys "25.2 Header <ranges> synopsis [ranges.syn]") = elements<0>; inline constexpr auto [values](#lib:views,values "25.2 Header <ranges> synopsis [ranges.syn]") = elements<1>; }// [[range.enumerate]](range.enumerate "25.7.24 Enumerate view"), enumerate viewtemplate<[view](range.view#concept:view "25.4.5 Views [range.view]") V>requires *see below*class enumerate_view; template<class View>constexpr bool enable_borrowed_range<enumerate_view<View>> = enable_borrowed_range<View>; namespace views { inline constexpr *unspecified* enumerate = *unspecified*; }// [[range.zip]](range.zip "25.7.25 Zip view"), zip viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")... Views>requires ([view](range.view#concept:view "25.4.5 Views [range.view]")<Views> && ...) && (sizeof...(Views) > 0)class zip_view; template<class... Views>constexpr bool enable_borrowed_range<zip_view<Views...>> =(enable_borrowed_range<Views> && ...); namespace views { inline constexpr *unspecified* zip = *unspecified*; }// [[range.zip.transform]](range.zip.transform "25.7.26 Zip transform view"), zip transform viewtemplate<[move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_­constructible [concept.moveconstructible]") F, [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")... Views>requires ([view](range.view#concept:view "25.4.5 Views [range.view]")<Views> && ...) && (sizeof...(Views) > 0) && is_object_v<F> &&[regular_invocable](concept.regularinvocable#concept:regular_invocable "18.7.3 Concept regular_­invocable [concept.regularinvocable]")<F&, range_reference_t<Views>...> &&[*can-reference*](iterator.synopsis#concept:can-reference "24.2 Header <iterator>&nbsp;synopsis [iterator.synopsis]")<invoke_result_t<F&, range_reference_t<Views>...>>class zip_transform_view; namespace views { inline constexpr *unspecified* zip_transform = *unspecified*; }// [[range.adjacent]](range.adjacent "25.7.27 Adjacent view"), adjacent viewtemplate<[forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]") V, size_t N>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V> && (N > 0)class adjacent_view; template<class V, size_t N>constexpr bool enable_borrowed_range<adjacent_view<V, N>> = enable_borrowed_range<V>; namespace views {template<size_t N>constexpr *unspecified* adjacent = *unspecified*; inline constexpr auto [pairwise](#lib:views,pairwise "25.2 Header <ranges> synopsis [ranges.syn]") = adjacent<2>; }// [[range.adjacent.transform]](range.adjacent.transform "25.7.28 Adjacent transform view"), adjacent transform viewtemplate<[forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]") V, [move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_­constructible [concept.moveconstructible]") F, size_t N>requires *see below*class adjacent_transform_view; namespace views {template<size_t N>constexpr *unspecified* adjacent_transform = *unspecified*; inline constexpr auto [pairwise_transform](#lib:views,pairwise_transform "25.2 Header <ranges> synopsis [ranges.syn]") = adjacent_transform<2>; }// [[range.chunk]](range.chunk "25.7.29 Chunk view"), chunk viewtemplate<[view](range.view#concept:view "25.4.5 Views [range.view]") V>requires [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")<V>class chunk_view; template<[view](range.view#concept:view "25.4.5 Views [range.view]") V>requires [forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]")<V>class chunk_view<V>; template<class V>constexpr bool enable_borrowed_range<chunk_view<V>> =[forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]")<V> && enable_borrowed_range<V>; namespace views { inline constexpr *unspecified* chunk = *unspecified*; }// [[range.slide]](range.slide "25.7.30 Slide view"), slide viewtemplate<[forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]") V>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V>class slide_view; template<class V>constexpr bool enable_borrowed_range<slide_view<V>> = enable_borrowed_range<V>; namespace views { inline constexpr *unspecified* slide = *unspecified*; }// [[range.chunk.by]](range.chunk.by "25.7.31 Chunk by view"), chunk by viewtemplate<[forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]") V, [indirect_binary_predicate](indirectcallable.indirectinvocable#concept:indirect_binary_predicate "24.3.6.3 Indirect callables [indirectcallable.indirectinvocable]")<iterator_t<V>, iterator_t<V>> Pred>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V> && is_object_v<Pred>class chunk_by_view; namespace views { inline constexpr *unspecified* chunk_by = *unspecified*; }// [[range.stride]](range.stride "25.7.32 Stride view"), stride viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V>class stride_view; template<class V>constexpr bool enable_borrowed_range<stride_view<V>> = enable_borrowed_range<V>; namespace views { inline constexpr *unspecified* stride = *unspecified*; }// [[range.cartesian]](range.cartesian "25.7.33 Cartesian product view"), cartesian product viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") First, [forward_range](range.refinements#concept:forward_range "25.4.6 Other range refinements [range.refinements]")... Vs>requires ([view](range.view#concept:view "25.4.5 Views [range.view]")<First> && ... && [view](range.view#concept:view "25.4.5 Views [range.view]")<Vs>)class cartesian_product_view; namespace views { inline constexpr *unspecified* cartesian_product = *unspecified*; }// [[range.cache.latest]](range.cache.latest "25.7.34 Cache latest view"), cache latest viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V>class cache_latest_view; namespace views { inline constexpr *unspecified* cache_latest = *unspecified*; }// [[range.to.input]](range.to.input "25.7.35 To input view"), to input viewtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V>class to_input_view; template<class V>constexpr bool enable_borrowed_range<to_input_view<V>> = enable_borrowed_range<V>; namespace views { inline constexpr *unspecified* to_input = *unspecified*; }}namespace std {namespace views = ranges::views; template<class T> struct tuple_size; template<size_t I, class T> struct tuple_element; template<class I, class S, ranges::subrange_kind K>struct tuple_size<ranges::subrange<I, S, K>>: integral_constant<size_t, 2> {}; template<class I, class S, ranges::subrange_kind K>struct tuple_element<0, ranges::subrange<I, S, K>> {using type = I; }; template<class I, class S, ranges::subrange_kind K>struct tuple_element<1, ranges::subrange<I, S, K>> {using type = S; }; template<class I, class S, ranges::subrange_kind K>struct tuple_element<0, const ranges::subrange<I, S, K>> {using type = I; }; template<class I, class S, ranges::subrange_kind K>struct tuple_element<1, const ranges::subrange<I, S, K>> {using type = S; }; struct from_range_t { explicit from_range_t() = default; }; inline constexpr from_range_t from_range{};}

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L608)

Within this Clause,
for an integer-like type X ([[iterator.concept.winc]](iterator.concept.winc "24.3.4.4 Concept weakly_­incrementable")),*make-unsigned-like-t*<X> denotesmake_unsigned_t<X> if X is an integer type;
otherwise, it denotes a corresponding unspecified unsigned-integer-like type
of the same width as X[.](#1.sentence-1)

For an expression x of type X,*to-unsigned-like*(x) isx explicitly converted to*make-unsigned-like-t*<X>[.](#1.sentence-2)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L622)

Also within this Clause,*make-signed-like-t*<X> for an integer-like type X denotes make_signed_t<X> if X is an integer type;
otherwise, it denotes a corresponding unspecified signed-integer-like type
of the same width as X[.](#2.sentence-1)
