namespace std::ranges {
template<input_range V, copy_constructible F>
requires view<V> && is_object_v<F> &&
regular_invocable<F&, range_reference_t<V>> &&
can-reference<invoke_result_t<F&, range_reference_t<V>>>
template<bool Const>
class transform_view<V, F>::sentinel {
private:
using Parent =
conditional_t<Const, const transform_view, transform_view>;
using Base = conditional_t<Const, const V, V>;
sentinel_t<Base> end_ = sentinel_t<Base>();
public:
sentinel() = default;
constexpr explicit sentinel(sentinel_t<Base> end);
constexpr sentinel(sentinel<!Const> i)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
constexpr sentinel_t<Base> base() const;
friend constexpr bool operator==(const iterator<Const>& x, const sentinel& y);
friend constexpr range_difference_t<Base>
operator-(const iterator<Const>& x, const sentinel& y)
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
friend constexpr range_difference_t<Base>
operator-(const sentinel& y, const iterator<Const>& x)
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
};
}
constexpr explicit sentinel(sentinel_t<Base> end);
Effects: Initializes
end_ with
end. constexpr sentinel(sentinel<!Const> i)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
Effects: Initializes
end_ with
std::move(i.end_). constexpr sentinel_t<Base> base() const;
Effects: Equivalent to: return end_;
friend constexpr bool operator==(const iterator<Const>& x, const sentinel& y);
Effects: Equivalent to: return x.current_ == y.end_;
friend constexpr range_difference_t<Base>
operator-(const iterator<Const>& x, const sentinel& y)
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
Effects: Equivalent to: return x.current_ - y.end_;
friend constexpr range_difference_t<Base>
operator-(const sentinel& y, const iterator<Const>& x)
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
Effects: Equivalent to: return y.end_ - x.current_;