diff --git a/src/hb-algs.hh b/src/hb-algs.hh index adf5c483ffb4c141a569ba1f15eb1356d3dafcd1..2765e1ced8f74c23cf0fe2d81a96a6898ecf982b 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -98,6 +98,17 @@ static const struct operator () (const Pair& pair) const { return pair.second; } } hb_second HB_UNUSED; +static const struct +{ + template T + operator () (const T& a, const T2& b) const { return a <= b ? a : b; } +} hb_min HB_UNUSED; +static const struct +{ + template T + operator () (const T& a, const T2& b) const { return a >= b ? a : b; } +} hb_max HB_UNUSED; + /* * Bithacks.