diff options
Diffstat (limited to 'common/func.h')
-rw-r--r-- | common/func.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/func.h b/common/func.h index c262c149c6..cff4e2d304 100644 --- a/common/func.h +++ b/common/func.h @@ -44,12 +44,17 @@ struct BinaryFunction { template<class T> struct EqualTo : public BinaryFunction<T, T, bool> { - bool operator()(const T& x, const T& y) const { return x == y; } + bool operator()(const T &x, const T &y) const { return x == y; } }; template<class T> struct Less : public BinaryFunction<T, T, bool> { - bool operator()(const T& x, const T& y) const { return x < y; } + bool operator()(const T &x, const T &y) const { return x < y; } +}; + +template<class T> +struct Greater : public BinaryFunction<T, T, bool> { + bool operator()(const T &x, const T &y) const { return x > y; } }; template<class Op> |