[iter] Add unary operator+ that returns a copy
This commit is contained in:
parent
fbab07f9b3
commit
2f5b1a9104
|
@ -69,6 +69,7 @@ struct hb_iter_t
|
||||||
|
|
||||||
/* Operators. */
|
/* Operators. */
|
||||||
iter_t iter () const { return *thiz(); }
|
iter_t iter () const { return *thiz(); }
|
||||||
|
iter_t operator + () const { return *thiz(); }
|
||||||
explicit_operator bool () const { return thiz()->__more__ (); }
|
explicit_operator bool () const { return thiz()->__more__ (); }
|
||||||
unsigned len () const { return thiz()->__len__ (); }
|
unsigned len () const { return thiz()->__len__ (); }
|
||||||
hb_remove_reference (item_t)* operator -> () const { return hb_addressof (**thiz()); }
|
hb_remove_reference (item_t)* operator -> () const { return hb_addressof (**thiz()); }
|
||||||
|
|
|
@ -135,7 +135,7 @@ main (int argc, char **argv)
|
||||||
hb_array_t<hb_vector_t<int> > pa;
|
hb_array_t<hb_vector_t<int> > pa;
|
||||||
pa->as_array ();
|
pa->as_array ();
|
||||||
|
|
||||||
s
|
+ s
|
||||||
| hb_map (hb_identity)
|
| hb_map (hb_identity)
|
||||||
| hb_filter ()
|
| hb_filter ()
|
||||||
| hb_filter (hb_bool)
|
| hb_filter (hb_bool)
|
||||||
|
|
Loading…
Reference in New Issue