[iter] Make hb_map into function-object

This commit is contained in:
Behdad Esfahbod 2019-02-15 16:09:29 -08:00
parent c1e5ba81fe
commit 98be7bd77a
1 changed files with 7 additions and 4 deletions

View File

@ -281,10 +281,13 @@ struct hb_map_iter_factory_t
private: private:
Proj f; Proj f;
}; };
template <typename Proj> static const struct
inline hb_map_iter_factory_t<Proj> {
hb_map (Proj&& f) template <typename Proj>
{ return hb_map_iter_factory_t<Proj> (f); } hb_map_iter_factory_t<Proj>
operator () (Proj&& f) const
{ return hb_map_iter_factory_t<Proj> (f); }
} hb_map HB_UNUSED;
template <typename Iter, typename Pred, typename Proj, template <typename Iter, typename Pred, typename Proj,
hb_enable_if (hb_is_iterator (Iter))> hb_enable_if (hb_is_iterator (Iter))>