24 Ranges library [ranges]

24.6 Range factories [range.factories]

24.6.4 Iota view [range.iota]

24.6.4.4 Class iota_­view​::​sentinel [range.iota.sentinel]

namespace std::ranges { template<weakly_­incrementable W, semiregular Bound> requires weakly-equality-comparable-with<W, Bound> && \libconcept{semiregular}<W> struct iota_view<W, Bound>::sentinel { private: Bound bound_ = Bound(); // exposition only public: sentinel() = default; constexpr explicit sentinel(Bound bound); friend constexpr bool operator==(const iterator& x, const sentinel& y); friend constexpr iter_difference_t<W> operator-(const iterator& x, const sentinel& y) requires sized_­sentinel_­for<Bound, W>; friend constexpr iter_difference_t<W> operator-(const sentinel& x, const iterator& y) requires sized_­sentinel_­for<Bound, W>; }; }
constexpr explicit sentinel(Bound bound);
Effects: Initializes bound_­ with bound.
friend constexpr bool operator==(const iterator& x, const sentinel& y);
Effects: Equivalent to: return x.value_­ == y.bound_­;
friend constexpr iter_difference_t<W> operator-(const iterator& x, const sentinel& y) requires sized_­sentinel_­for<Bound, W>;
Effects: Equivalent to: return x.value_­ - y.bound_­;
friend constexpr iter_difference_t<W> operator-(const sentinel& x, const iterator& y) requires sized_­sentinel_­for<Bound, W>;
Effects: Equivalent to: return -(y - x);