[iter] Make hb_filter() a function-object
This commit is contained in:
parent
aa4c321262
commit
00db94095d
|
@ -322,11 +322,14 @@ struct hb_filter_iter_factory_t
|
||||||
Pred p;
|
Pred p;
|
||||||
Proj f;
|
Proj f;
|
||||||
};
|
};
|
||||||
template <typename Pred = decltype ((hb_bool)),
|
static const struct
|
||||||
|
{
|
||||||
|
template <typename Pred = decltype ((hb_bool)),
|
||||||
typename Proj = decltype ((hb_identity))>
|
typename Proj = decltype ((hb_identity))>
|
||||||
inline hb_filter_iter_factory_t<Pred, Proj>
|
hb_filter_iter_factory_t<Pred, Proj>
|
||||||
hb_filter (Pred&& p = hb_bool, Proj&& f = hb_identity)
|
operator () (Pred&& p = hb_bool, Proj&& f = hb_identity) const
|
||||||
{ return hb_filter_iter_factory_t<Pred, Proj> (p, f); }
|
{ return hb_filter_iter_factory_t<Pred, Proj> (p, f); }
|
||||||
|
} hb_filter HB_UNUSED;
|
||||||
|
|
||||||
/* hb_zip() */
|
/* hb_zip() */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue