interval: Add empty() method
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
b43b853235
commit
601cfec62d
@ -45,6 +45,13 @@ namespace stdex
|
||||
///
|
||||
inline T size() const { return start <= end ? end - start : 0; }
|
||||
|
||||
///
|
||||
/// Is interval empty?
|
||||
///
|
||||
/// \returns true if interval is empty or false otherwise
|
||||
///
|
||||
inline bool empty() const { return start >= end; }
|
||||
|
||||
///
|
||||
/// Is interval valid?
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user