diff options
Diffstat (limited to 'core/pair.h')
-rw-r--r-- | core/pair.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/pair.h b/core/pair.h index f780c79c81..535c3355b6 100644 --- a/core/pair.h +++ b/core/pair.h @@ -44,6 +44,16 @@ struct Pair { }; template <class F, class S> +bool operator==(const Pair<F, S> &pair, const Pair<F, S> &other) { + return (pair.first == other.first) && (pair.second == other.second); +} + +template <class F, class S> +bool operator!=(const Pair<F, S> &pair, const Pair<F, S> &other) { + return (pair.first != other.first) || (pair.second != other.second); +} + +template <class F, class S> struct PairSort { bool operator()(const Pair<F, S> &A, const Pair<F, S> &B) const { |