protocol/RangeArg: add Contains()
This commit is contained in:
@@ -42,6 +42,10 @@ struct RangeArg {
|
||||
constexpr bool IsAll() const noexcept {
|
||||
return *this == All();
|
||||
}
|
||||
|
||||
constexpr bool Contains(unsigned i) const noexcept {
|
||||
return i >= start && i < end;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user