Added a length() function to ranges
This commit is contained in:
parent
4384c473f9
commit
5a33c850a3
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ public:
|
||||||
std::pair<Type, Type> getPair() const noexcept { return std::make_pair<Type, Type>(_start, _end); }
|
std::pair<Type, Type> getPair() const noexcept { return std::make_pair<Type, Type>(_start, _end); }
|
||||||
Range(const Range<Type>& range) = default;
|
Range(const Range<Type>& range) = default;
|
||||||
Range(Range<Type>&& range) = default;
|
Range(Range<Type>&& range) = default;
|
||||||
constexpr Type length() { return _end - _start; }
|
constexpr Type length() const { return _end - _start; }
|
||||||
void setStart(Type start) noexcept
|
void setStart(Type start) noexcept
|
||||||
{
|
{
|
||||||
_start = start;
|
_start = start;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue