[array] Add cast operator to add const to Type

In lieu of constructor removed in previous commit.
This commit is contained in:
Behdad Esfahbod 2018-12-17 00:39:30 -05:00
parent 15acf33c22
commit 381c3548e9
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ struct hb_array_t
explicit_operator bool (void) const { return len; }
Type * operator & (void) const { return arrayZ; }
Type & operator * (void) { return (this->operator [])[0]; }
operator hb_array_t<const Type> (void) { return hb_array_t<const Type> (arrayZ, len); }
template <typename T> operator T * (void) const { return arrayZ; }
hb_array_t<Type> & operator += (unsigned int count)