diff --git a/src/basic_types.hpp b/src/basic_types.hpp index 4db850021984..401aa90f3b9d 100644 --- a/src/basic_types.hpp +++ b/src/basic_types.hpp @@ -42,6 +42,7 @@ using Real = double; struct IndexRange { int s = 0; /// Starting Index (inclusive) int e = 0; /// Ending Index (inclusive) + int size() const { return e - s + 1;} operator std::pair() const { return {s, e}; } };