protocol/RangeArg: add method IsOpenEnded()

This commit is contained in:
Max Kellermann 2021-02-15 19:56:46 +01:00
parent 6e1940e930
commit ad059d5804
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@ struct RangeArg {
return !(*this == other);
}
constexpr bool IsOpenEnded() const noexcept {
return end == All().end;
}
constexpr bool IsAll() const noexcept {
return *this == All();
}