Use universal references in hb_min/max

This commit is contained in:
Behdad Esfahbod 2019-05-07 20:55:33 -07:00
parent 41248cce0e
commit 2b9402a86a
1 changed files with 2 additions and 2 deletions

View File

@ -193,13 +193,13 @@ HB_FUNCOBJ (hb_second);
struct struct
{ {
template <typename T, typename T2> auto template <typename T, typename T2> auto
operator () (const T& a, const T2& b) const HB_AUTO_RETURN (a <= b ? a : b) operator () (T&& a, T2&& b) const HB_AUTO_RETURN (a <= b ? a : b)
} }
HB_FUNCOBJ (hb_min); HB_FUNCOBJ (hb_min);
struct struct
{ {
template <typename T, typename T2> auto template <typename T, typename T2> auto
operator () (const T& a, const T2& b) const HB_AUTO_RETURN (a >= b ? a : b) operator () (T&& a, T2&& b) const HB_AUTO_RETURN (a >= b ? a : b)
} }
HB_FUNCOBJ (hb_max); HB_FUNCOBJ (hb_max);