class ov::cmp::Between¶
Overview¶
Compare if value is between lower and upper bounds. More…
#include <compare.hpp>
template <class T, Bound BMode = Bound::NONE>
class Between
{
public:
// construction
Between(const T& lower, const T& upper);
// methods
template <Bound B = BMode, typename std::enable_if<B==Bound::BOTH>::type \* = nullptr>
constexpr bool operator () (const T& value) const;
const T& upper() const;
const T& lower() const;
};
Detailed Documentation¶
Compare if value is between lower and upper bounds.
The Between comparator has four modes to check value:
Bound::None (lower, upper)
Bound::LOWER [lower, upper)
Bound::UPPER (lower, upper]
Bound::BOTH [lower, upper]
Parameters:
T |
Value type to compare. |
BMode |
Compare bounds mode. |