diff --git a/src/hb-array.hh b/src/hb-array.hh index 74b6757b2..ee34dd54d 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -43,20 +43,29 @@ struct hb_array_t : hb_iter_with_fallback_t, Type&> * Constructors. */ hb_array_t () : arrayZ (nullptr), length (0) {} - hb_array_t (const hb_array_t &o) : - hb_iter_with_fallback_t, Type&> (), - arrayZ (o.arrayZ), length (o.length) {} - template - hb_array_t (const hb_array_t > &o) : arrayZ (o.arrayZ), length (o.length) {} - hb_array_t (Type *array_, unsigned int length_) : arrayZ (array_), length (length_) {} template hb_array_t (Type (&array_)[length_]) : arrayZ (array_), length (length_) {} - template - hb_array_t& operator = (const hb_array_t > &o) - { arrayZ = o.arrayZ; length = o.length; return *this; } - hb_array_t& operator = (const hb_array_t &o) + template , U) || + hb_is_same (Type, hb_remove_reference) || + hb_is_same (hb_remove_const, hb_remove_reference) + )> + hb_array_t (const hb_array_t &o) : + hb_iter_with_fallback_t, Type&> (), + arrayZ (o.arrayZ), length (o.length) {} + template , U) || + hb_is_same (Type, hb_remove_reference) || + hb_is_same (hb_remove_const, hb_remove_reference) + )> + hb_array_t& operator = (const hb_array_t &o) { arrayZ = o.arrayZ; length = o.length; return *this; } + /* * Iterator implementation. */