24 Ranges library [ranges]

24.7 Range adaptors [range.adaptors]

24.7.19 Zip view [range.zip]

24.7.19.4 Class template zip_­view​::​sentinel [range.zip.sentinel]

namespace std::ranges { template<input_­range... Views> requires (view<Views> && ...) && (sizeof...(Views) > 0) template<bool Const> class zip_view<Views...>::sentinel { tuple-or-pair<sentinel_t<maybe-const<Const, Views>>...> end_; // exposition only constexpr explicit sentinel(tuple-or-pair<sentinel_t<maybe-const<Const, Views>>...> end); // exposition only public: sentinel() = default; constexpr sentinel(sentinel<!Const> i) requires Const && (convertible_­to<sentinel_t<Views>, sentinel_t<maybe-const<Const, Views>>> && ...); template<bool OtherConst> requires (sentinel_­for<sentinel_t<maybe-const<Const, Views>>, iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y); template<bool OtherConst> requires (sized_­sentinel_­for<sentinel_t<maybe-const<Const, Views>>, iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr common_type_t<range_difference_t<maybe-const<OtherConst, Views>>...> operator-(const iterator<OtherConst>& x, const sentinel& y); template<bool OtherConst> requires (sized_­sentinel_­for<sentinel_t<maybe-const<Const, Views>>, iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr common_type_t<range_difference_t<maybe-const<OtherConst, Views>>...> operator-(const sentinel& y, const iterator<OtherConst>& x); }; }
constexpr explicit sentinel(tuple-or-pair<sentinel_t<maybe-const<Const, Views>>...> end);
Effects: Initializes end_­ with end.
constexpr sentinel(sentinel<!Const> i) requires Const && (convertible_­to<sentinel_t<Views>, sentinel_t<maybe-const<Const, Views>>> && ...);
Effects: Initializes end_­ with std​::​move(i.end_­).
template<bool OtherConst> requires (sentinel_­for<sentinel_t<maybe-const<Const, Views>>, iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
Returns: true if there exists an integer such that bool(std​::​get<i>(x.current_­) == std​::​get<i>(y.end_­)) is true.
Otherwise, false.
template<bool OtherConst> requires (sized_­sentinel_­for<sentinel_t<maybe-const<Const, Views>>, iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr common_type_t<range_difference_t<maybe-const<OtherConst, Views>>...> operator-(const iterator<OtherConst>& x, const sentinel& y);
Let D be the return type.
Let DIST(i) be D(std​::​get<i>(x.current_­) - std​::​get<i>(y.end_­)).
Returns: The value with the smallest absolute value among DIST(n) for all integers .
template<bool OtherConst> requires (sized_­sentinel_­for<sentinel_t<maybe-const<Const, Views>>, iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr common_type_t<range_difference_t<maybe-const<OtherConst, Views>>...> operator-(const sentinel& y, const iterator<OtherConst>& x);
Effects: Equivalent to return -(x - y);