47 static_assert(std::is_arithmetic<T>::value,
"Template argument of Interval must be arithmetic.");
63 constexpr RangeT(T minimum, T maximum, T increment)
65 , m_increment{ increment }
67 if (increment > maximum - minimum)
110 return !(rhs == *
this);
Thrown when a function receives an invalid parameter.
Represents a continuous numeric interval with inclusive lower and upper bounds.
constexpr bool operator==(const IntervalT< H > &rhs) const
Compares two intervals for equality (integral types).
Represents a numeric range with defined boundaries and a fixed increment.
constexpr bool operator==(const RangeT &rhs) const
Compares this range with another for equality.
constexpr T GetIncrement() const
Retrieves the increment value associated with this range.
constexpr RangeT(T minimum, T maximum, T increment)
Constructs a range with specified minimum, maximum, and increment values.
constexpr bool operator!=(const RangeT &rhs) const
Compares this range with another for inequality.
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.