提交 cf61acb9 编写于 作者: B Behdad Esfahbod

[iter] Accept rvalues to hb_enumerate()

上级 e8bd5fc3
......@@ -529,7 +529,7 @@ struct
template <typename Iterable,
hb_requires (hb_is_iterable (Iterable))>
hb_enumerate_iter_t<hb_iter_t (Iterable)>
operator () (Iterable& it) const
operator () (Iterable&& it) const
{ return hb_enumerate_iter_t<hb_iter_t (Iterable)> (hb_iter (it)); }
}
HB_FUNCOBJ (hb_enumerate);
......
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册