Class Subspace :: sus :: ops :: RangeTo

template <class T>
class RangeTo final
requires
sus::cmp::Ord<T>
{ ... };

A range only bounded exclusively above (..end).

The RangeTo ..end contains all values with x < end. It cannot serve as an Iterator because it doesn't have a starting point.

A RangeTo can be constructed as a literal as "..end"_r.

Static Methods

RangeTo()
requires
sus::construct::Default<T>
RangeTo(T finish)

Methods

auto contains(const T& item) const -> bool

Returns true if item is contained in the range.

Part of the sus::ops::RangeBounds trait.

auto end_at(T t) const& -> RangeTo<T>
requires
sus::mem::Copy<T>
auto end_at(T t) && -> RangeTo<T>

Return a new Range that still has no start and ends at t.

auto end_bound() const& -> Option<const T&>
auto end_bound() && -> Option<const T&>
deleted

Returns the end of the RangeBounds, exclusive of its own value.

Part of the sus::ops::RangeBounds trait.

auto start_at(T t) const& -> Range<T>
requires
sus::mem::Copy<T>
auto start_at(T t) && -> Range<T>

Return a new Range that starts at t and ends where the original Range did.

auto start_bound() const& -> Option<const T&>
auto start_bound() && -> Option<const T&>
deleted

Returns None for the beginning of the RangeBounds.

Part of the sus::ops::RangeBounds trait.

Operators

auto operator==(const RangeTo<T>& rhs) const -> bool
requires
sus::cmp::Eq<T>

Data Members

The end of the range, exclusive of the given value.