From ad059d58045355913e6ba77f1e938f46cfd7739b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 15 Feb 2021 19:56:46 +0100 Subject: [PATCH] protocol/RangeArg: add method IsOpenEnded() --- src/protocol/RangeArg.hxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/protocol/RangeArg.hxx b/src/protocol/RangeArg.hxx index ab00dc990..246210b83 100644 --- a/src/protocol/RangeArg.hxx +++ b/src/protocol/RangeArg.hxx @@ -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(); }