[range.chunk.inner.iter]

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

## 25.7 Range adaptors [[range.adaptors]](range.adaptors#range.chunk.inner.iter)

### 25.7.29 Chunk view [[range.chunk]](range.chunk#inner.iter)

#### 25.7.29.5 Class chunk_view​::​*inner-iterator* [range.chunk.inner.iter]

[ð](#lib:chunk_view::inner-iterator)

namespace std::ranges {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 chunk_view<V>::*inner-iterator* { chunk_view* *parent_*; // *exposition only*constexpr explicit *inner-iterator*(chunk_view& parent) noexcept; // *exposition only*public:using iterator_concept = input_iterator_tag; using difference_type = range_difference_t<V>; using value_type = range_value_t<V>; *inner-iterator*(*inner-iterator*&&) = default; *inner-iterator*& operator=(*inner-iterator*&&) = default; constexpr const iterator_t<V>& base() const &; constexpr range_reference_t<V> operator*() const; constexpr *inner-iterator*& operator++(); constexpr void operator++(int); friend constexpr bool operator==(const *inner-iterator*& x, default_sentinel_t); friend constexpr difference_type operator-(default_sentinel_t y, const *inner-iterator*& x)requires [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<sentinel_t<V>, iterator_t<V>>; friend constexpr difference_type operator-(const *inner-iterator*& x, default_sentinel_t y)requires [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<sentinel_t<V>, iterator_t<V>>; friend constexpr range_rvalue_reference_t<V> iter_move(const *inner-iterator*& i)noexcept(noexcept(ranges::iter_move(*i.*parent_*->*current_*))); friend constexpr void iter_swap(const *inner-iterator*& x, const *inner-iterator*& y)noexcept(noexcept(ranges::iter_swap(*x.*parent_*->*current_*, *y.*parent_*->*current_*)))requires [indirectly_swappable](alg.req.ind.swap#concept:indirectly_swappable "24.3.7.4 Concept indirectly_­swappable [alg.req.ind.swap]")<iterator_t<V>>; };}

[ð](#lib:chunk_view::inner-iterator,constructor)

`constexpr explicit inner-iterator(chunk_view& parent) noexcept;
`

[1](#1)

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

*Effects*: Initializes *parent_* with addressof(parent)[.](#1.sentence-1)

[ð](#lib:base,chunk_view::inner-iterator)

`constexpr const iterator_t<V>& base() const &;
`

[2](#2)

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

*Effects*: Equivalent to: return **parent_*->*current_*;

[ð](#lib:operator*,chunk_view::inner-iterator)

`constexpr range_reference_t<V> operator*() const;
`

[3](#3)

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

*Preconditions*: *this == default_sentinel is false[.](#3.sentence-1)

[4](#4)

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

*Effects*: Equivalent to: return ***parent_*->*current_*;

[ð](#lib:operator++,chunk_view::inner-iterator)

`constexpr inner-iterator& operator++();
`

[5](#5)

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

*Preconditions*: *this == default_sentinel is false[.](#5.sentence-1)

[6](#6)

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

*Effects*: Equivalent to:++**parent_*->*current_*;if (**parent_*->*current_* == ranges::end(*parent_*->*base_*))*parent_*->*remainder_* = 0;else--*parent_*->*remainder_*;return *this;

[ð](#lib:operator++,chunk_view::inner-iterator_)

`constexpr void operator++(int);
`

[7](#7)

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

*Effects*: Equivalent to ++*this[.](#7.sentence-1)

[ð](#lib:operator==,chunk_view::inner-iterator)

`friend constexpr bool operator==(const inner-iterator& x, default_sentinel_t);
`

[8](#8)

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

*Returns*: x.*parent_*->*remainder_* == 0[.](#8.sentence-1)

[ð](#lib:operator-,chunk_view::inner-iterator)

`friend constexpr difference_type operator-(default_sentinel_t y, const inner-iterator& x)
  requires [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<sentinel_t<V>, iterator_t<V>>;
`

[9](#9)

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

*Effects*: Equivalent to:return ranges::min(x.*parent_*->*remainder_*,
 ranges::end(x.*parent_*->*base_*) - *x.*parent_*->*current_*);

[ð](#lib:operator-,chunk_view::inner-iterator_)

`friend constexpr difference_type operator-(const inner-iterator& x, default_sentinel_t y)
  requires [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<sentinel_t<V>, iterator_t<V>>;
`

[10](#10)

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

*Effects*: Equivalent to: return -(y - x);

[ð](#lib:iter_move,chunk_view::inner-iterator)

`friend constexpr range_rvalue_reference_t<V> iter_move(const inner-iterator& i)
  noexcept(noexcept(ranges::iter_move(*i.parent_->current_)));
`

[11](#11)

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

*Effects*: Equivalent to: return ranges​::​iter_move(*i.*parent_*->*current_*);

[ð](#lib:iter_swap,chunk_view::inner-iterator)

`friend constexpr void iter_swap(const inner-iterator& x, const inner-iterator& y)
  noexcept(noexcept(ranges::iter_swap(*x.parent_->current_, *y.parent_->current_)))
  requires [indirectly_swappable](alg.req.ind.swap#concept:indirectly_swappable "24.3.7.4 Concept indirectly_­swappable [alg.req.ind.swap]")<iterator_t<V>>;
`

[12](#12)

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

*Effects*: Equivalent to: ranges​::​iter_swap(*x.*parent_*->*current_*, *y.*parent_*->*current_*);
