[vector] Add operator bool

This commit is contained in:
Behdad Esfahbod 2018-12-20 23:15:49 -05:00
parent bd36977392
commit a728c63a98

View File

@ -89,6 +89,8 @@ struct hb_vector_t
return arrayZ()[i];
}
explicit_operator bool () const { return len; }
hb_array_t<Type> as_array ()
{ return hb_array (arrayZ(), len); }
hb_array_t<const Type> as_array () const