Use auto return type for hb_first/hb_second

This commit is contained in:
Behdad Esfahbod 2019-04-16 18:26:30 -04:00
parent fe30fcd228
commit 0241a40f2a
1 changed files with 4 additions and 4 deletions

View File

@ -169,14 +169,14 @@ hb_pair (T1&& a, T2&& b) { return hb_pair_t<T1, T2> (a, b); }
struct struct
{ {
template <typename Pair> decltype (hb_declval (Pair).first) template <typename Pair> auto
operator () (const Pair& pair) const { return pair.first; } operator () (const Pair& pair) const HB_AUTO_RETURN_EXPR (pair.first)
} HB_FUNCOBJ (hb_first); } HB_FUNCOBJ (hb_first);
struct struct
{ {
template <typename Pair> decltype (hb_declval (Pair).second) template <typename Pair> auto
operator () (const Pair& pair) const { return pair.second; } operator () (const Pair& pair) const HB_AUTO_RETURN_EXPR (pair.second)
} HB_FUNCOBJ (hb_second); } HB_FUNCOBJ (hb_second);
struct struct