From d3e1d5044f23a2dc910f4253c3f4976bf08f93ab Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 15 May 2019 14:25:54 -0700 Subject: [PATCH] Add all pair_t comparison operators --- src/hb-algs.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index 24bdeb190..a10e82e9e 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -226,6 +226,11 @@ struct hb_pair_t { return hb_pair_t (second, first); } bool operator == (const pair_t& o) const { return first == o.first && second == o.second; } + bool operator != (const pair_t& o) const { return !(*this == o); } + bool operator < (const pair_t& o) const { return first < o.first || (first == o.first && second < o.second); } + bool operator >= (const pair_t& o) const { return !(*this < o); } + bool operator > (const pair_t& o) const { return first > o.first || (first == o.first && second > o.second); } + bool operator <= (const pair_t& o) const { return !(*this > o); } T1 first; T2 second;