From aa4c3212628f6861f1ef3ecb9eb5205b5780ac91 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 14 Feb 2019 11:07:12 -0800 Subject: [PATCH] [iter] Make hb_zip() a function-object --- src/hb-iter.hh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index b6c9e2d06..fefd81ee4 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -358,11 +358,14 @@ struct hb_zip_iter_t : A a; B b; }; -template -inline hb_zip_iter_t -hb_zip (const A& a, const B &b) -{ return hb_zip_iter_t (a.iter (), b.iter ()); } +static const struct +{ + template + hb_zip_iter_t + operator () (const A& a, const B &b) const + { return hb_zip_iter_t (a.iter (), b.iter ()); } +} hb_zip HB_UNUSED; /* hb_sink() */