| ||||||||||||||||||||||
| Range primitives | |||||||
| |||||||
| Range concepts | |||||||||||||||||||
| |||||||||||||||||||
| Range factories | |||||||||
| |||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Helper items | |||||||||||||||||
| |||||||||||||||||
struct/*iterator*/; | (exposition only*) | |
ranges::repeat_view<W, Bound>::iterator is the type of the iterators returned bybegin() andend() ofranges::repeat_view<W, Bound>.
Exposition-only types | |
| Type | Definition |
index-type | std::conditional_t<std::same_as<Bound,std::unreachable_sentinel_t>, std::ptrdiff_t, Bound>(exposition-only member type*) |
Iterator property types | |
| Type | Definition |
iterator_concept | std::random_access_iterator_tag |
iterator_category | std::random_access_iterator_tag |
value_type | W |
difference_type | std::conditional_t<is-signed-integer-like <index-type >, index-type , iota-diff-t <index-type >> |
| Member | Definition |
const W*value_ | a pointer to the value to repeat (exposition-only member object*) |
index-typecurrent_ | the current position (exposition-only member object*) |
/*iterator*/()=default; | (1) | (since C++23) |
constexprexplicit/*iterator*/ (const W* value,/*index-type*/ b=/*index-type*/()); | (2) | (since C++23) (exposition only*) |
Constructs an iterator. Overload(2) is called bybegin() andend() ofranges::repeat_view.
constexprconst W& operator*()constnoexcept; | (since C++23) | |
Returns*value_.
constexprconst W& operator[]( difference_type n)constnoexcept; | (since C++23) | |
Returns*(*this+ n).
constexpr/*iterator*/& operator++(); | (1) | (since C++23) |
constexprvoid operator++(int); | (2) | (since C++23) |
current_ ;return*this;.constexpr/*iterator*/& operator--(); | (1) | (since C++23) |
constexpr/*iterator*/ operator--(int); | (2) | (since C++23) |
current_ ;return*this;.constexpr/*iterator*/& operator+=( difference_type n); | (since C++23) | |
Equivalent tocurrent_ += n;return*this;.
IfBound is notstd::unreachable_sentinel_t andcurrent_ + n is negative, the behavior is undefined.
constexpr/*iterator*/& operator-=( difference_type n); | (since C++23) | |
Equivalent tocurrent_ -= n;return*this;.
IfBound is notstd::unreachable_sentinel_t andcurrent_ - n is negative, the behavior is undefined.
friendconstexprbool operator== (const/*iterator*/& x,const/*iterator*/& y); | (1) | (since C++23) |
friendconstexprauto operator<=> (const/*iterator*/& x,const/*iterator*/& y); | (2) | (since C++23) |
The!= operator issynthesized fromoperator==.
These functions are not visible to ordinaryunqualified orqualified lookup, and can only be found byargument-dependent lookup wheniterator is an associated class of the arguments.
friendconstexpr/*iterator*/ operator+ (/*iterator*/ i, difference_type n); | (1) | (since C++23) |
friendconstexpr/*iterator*/ operator+ ( difference_type n,/*iterator*/ i); | (2) | (since C++23) |
Equivalent toi+= n;return i;.
These functions are not visible to ordinaryunqualified orqualified lookup, and can only be found byargument-dependent lookup wheniterator is an associated class of the arguments.
friendconstexpr/*iterator*/ operator- (/*iterator*/ i, difference_type n); | (1) | (since C++23) |
friendconstexpr difference_type operator- (const/*iterator*/& x,const/*iterator*/& y); | (2) | (since C++23) |
difference_type>(x.current_ )- static_cast<difference_type>(y.current_ ).These functions are not visible to ordinaryunqualified orqualified lookup, and can only be found byargument-dependent lookup wheniterator is an associated class of the arguments.
iterator is alwaysrandom_access_iterator.