31 template<
class IntType>
35 return (start_ + ((i < 0 || i > size_) ? size_ : i) * stride_);
39 template<
class IntType>
43 const StrideRange<IntT2>& other
46 if (this->start() < other.start())
return -1;
47 if (other.start() < this->start())
return +1;
49 if (this->size() < other.size())
return -1;
50 if (other.size() < this->size())
return +1;
52 if (this->stride() < other.stride())
return -1;
53 if (other.stride() < this->stride())
return +1;
61 template<
class IntType>
70 template<
class IntType>
99 template<
class IntType>
100 inline constexpr IntType
107 template<
class IntType>
108 inline constexpr IntType
111 return (start_ + size_ * stride_);
115 template<
class IntType>
116 inline constexpr IntType
119 return (start_ + (size_-1) * stride_);
123 template<
class IntType>
124 inline constexpr IntType
127 return (start_ - stride_);
133 template<
class IntType>
134 inline constexpr IntType
137 return (start_ + i * stride_);
141 template<
class IntType>
142 template<
class IntT2>
150 this->start() == other.start()
151 && this->size() == other.size()
152 && this->stride() == other.stride()
constexpr IntType rend_value() const noexcept
The value that is one stride before the begin of start/size range.
constexpr IntType begin_value() const noexcept
The value at the beginning of the range - same as start()
constexpr IntType end_value() const noexcept
The value that is one stride beyond the end of the range.
constexpr IntType operator[](IntType i) const noexcept
Offset dereference, without bounds checking Return element in the range, without bounds checking...
constexpr StrideRange() noexcept
Default construct an empty stride range (0,0,0)
A tuple of integrals comprising start, size, stride. Caution: not properly tested for use with negati...
constexpr IntType rbegin_value() const noexcept
The max value of the end of start/size range.