diff --git a/src/hb-algs.hh b/src/hb-algs.hh index 85f4f56d5..a0896dda9 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -35,7 +35,7 @@ template inline typename T::iter_t hb_iter (const T& c) { return c.iter (); } -static HB_UNUSED const struct hb_identity_t +static HB_UNUSED const struct hb_identity_ft { template T operator () (const T& v) const { return v; } @@ -59,13 +59,13 @@ struct hb_pair_t template static inline hb_pair_t hb_pair (T1 a, T2 b) { return hb_pair_t (a, b); } -static HB_UNUSED const struct hb_first_t +static HB_UNUSED const struct hb_first_ft { template typename Pair::first_t operator () (const Pair& pair) const { return pair.first; } } hb_first; -static HB_UNUSED const struct hb_second_t +static HB_UNUSED const struct hb_second_ft { template typename Pair::second_t operator () (const Pair& pair) const { return pair.second; } diff --git a/src/hb-iter.hh b/src/hb-iter.hh index f8b0987d6..eff4e2833 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -281,7 +281,7 @@ struct hb_filter_iter_factory_t Pred p; Proj f; }; -template +template inline hb_filter_iter_factory_t hb_filter (Pred&& p, Proj&& f = hb_identity) { return hb_filter_iter_factory_t (p, f); }