提交 00db9409 编写于 作者: B Behdad Esfahbod

[iter] Make hb_filter() a function-object

上级 aa4c3212
...@@ -322,11 +322,14 @@ struct hb_filter_iter_factory_t ...@@ -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
typename Proj = decltype ((hb_identity))> {
inline hb_filter_iter_factory_t<Pred, Proj> template <typename Pred = decltype ((hb_bool)),
hb_filter (Pred&& p = hb_bool, Proj&& f = hb_identity) typename Proj = decltype ((hb_identity))>
{ return hb_filter_iter_factory_t<Pred, Proj> (p, f); } hb_filter_iter_factory_t<Pred, Proj>
operator () (Pred&& p = hb_bool, Proj&& f = hb_identity) const
{ return hb_filter_iter_factory_t<Pred, Proj> (p, f); }
} hb_filter HB_UNUSED;
/* hb_zip() */ /* hb_zip() */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册