diff --git a/src/hb-iter.hh b/src/hb-iter.hh index f23904c22..9a3c2f43f 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -137,6 +137,11 @@ static const struct operator () (T&& c) const { return c.iter (); } + template + hb_iter_t (T) + operator () (T* c) const + { return c->iter (); } + /* Specialization for C arrays. */ template inline hb_array_t diff --git a/src/test-iter.cc b/src/test-iter.cc index 675bbe397..dcfdd1183 100644 --- a/src/test-iter.cc +++ b/src/test-iter.cc @@ -106,6 +106,9 @@ main (int argc, char **argv) int dst[20]; hb_vector_t v; + hb_iter (v); + hb_iter (&v); + array_iter_t s (src); /* Implicit conversion from static array. */ array_iter_t s2 (v); /* Implicit conversion from vector. */ array_iter_t t (dst);