From 98be7bd77ada32e58dad76897cefcf1d99538d2b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 15 Feb 2019 16:09:29 -0800 Subject: [PATCH] [iter] Make hb_map into function-object --- src/hb-iter.hh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index c74ea951..7068aa4c 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -281,10 +281,13 @@ struct hb_map_iter_factory_t private: Proj f; }; -template -inline hb_map_iter_factory_t -hb_map (Proj&& f) -{ return hb_map_iter_factory_t (f); } +static const struct +{ + template + hb_map_iter_factory_t + operator () (Proj&& f) const + { return hb_map_iter_factory_t (f); } +} hb_map HB_UNUSED; template -- GitLab