diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 5ad839e2a..74cfbc862 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -529,7 +529,7 @@ struct template hb_enumerate_iter_t - operator () (Iterable& it) const + operator () (Iterable&& it) const { return hb_enumerate_iter_t (hb_iter (it)); } } HB_FUNCOBJ (hb_enumerate); diff --git a/src/test-iter.cc b/src/test-iter.cc index e8c6bda6b..bd99f83e6 100644 --- a/src/test-iter.cc +++ b/src/test-iter.cc @@ -157,6 +157,8 @@ main (int argc, char **argv) test_iterator (hb_zip (st, v)); test_iterator_non_default_constructable (hb_enumerate (st)); + test_iterator_non_default_constructable (hb_enumerate (hb_iter (st))); + test_iterator_non_default_constructable (hb_enumerate (hb_iter (st) + 1)); test_iterator_non_default_constructable (hb_iter (st) | hb_filter ()); test_iterator_non_default_constructable (hb_iter (st) | hb_map (hb_identity));