namespace std::ranges {
template<view V>
template<bool Const>
class take_view<V>::sentinel {
private:
using Base = conditional_t<Const, const V, V>;
using CI = counted_iterator<iterator_t<Base>>;
sentinel_t<Base> end_ = sentinel_t<Base>();
public:
sentinel() = default;
constexpr explicit sentinel(sentinel_t<Base> end);
constexpr sentinel(sentinel<!Const> s)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
constexpr sentinel_t<Base> base() const;
friend constexpr bool operator==(const CI& y, const sentinel& x);
};
}
constexpr explicit sentinel(sentinel_t<Base> end);
Effects:
Initializes
end_ with
end. constexpr sentinel(sentinel<!Const> s)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
Effects:
Initializes
end_ with
std::move(s.end_). constexpr sentinel_t<Base> base() const;
Effects:
Equivalent to: return end_;
friend constexpr bool operator==(const CI& y, const sentinel& x);
Effects:
Equivalent to:
return y.count() == 0 || y.base() == x.end_;