125 [[nodiscard]]
constexpr auto begin()
const {
return Iter{
b}; }
126 [[nodiscard]]
constexpr auto end()
const {
return Iter{
e}; }
132template<
typename T> [[nodiscard]]
constexpr auto xrange(T e)
134 return XRange<T>{T(0), e < T(0) ? T(0) : e};
136template<
typename T1,
typename T2> [[nodiscard]]
constexpr auto xrange(T1 b, T2 e)
138 static_assert(std::is_signed_v<T1> == std::is_signed_v<T2>);
139 using T = std::common_type_t<T1, T2>;
146template<
typename T,
typename Op>
149 for (
auto i :
xrange(n)) {
constexpr friend Iter operator+(Iter i, difference_type n)
constexpr Iter & operator+=(difference_type n)
ptrdiff_t difference_type
auto operator<=>(const Iter &) const =default
constexpr Iter & operator--()
constexpr T operator[](difference_type n)
std::random_access_iterator_tag iterator_category
constexpr friend difference_type operator-(const Iter &i, const Iter &j)
constexpr friend Iter operator+(difference_type n, Iter i)
constexpr friend Iter operator-(Iter i, difference_type n)
constexpr Iter & operator++()
constexpr Iter operator++(int)
constexpr T operator*() const
constexpr Iter & operator-=(difference_type n)
constexpr Iter operator--(int)
constexpr auto end() const
constexpr auto begin() const
constexpr void repeat(T n, Op op)
Repeat the given operation 'op' 'n' times.
constexpr auto xrange(T e)