diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 4111e8079..7cf237933 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -287,9 +287,10 @@ struct hb_vector_t } return new_array; } - /* Specialization for hb_vector_t> to speed up. */ + /* Specialization for hb_vector_t> to speed up. */ template ))> + hb_enable_if (hb_is_same (T, hb_vector_t) || + hb_is_same (T, hb_array_t ))> Type * realloc_vector (unsigned new_allocated, hb_priority<1>) { @@ -317,9 +318,10 @@ struct hb_vector_t for (; length < size; length++) new (std::addressof (arrayZ[length])) Type (); } - /* Specialization for hb_vector_t> to speed up. */ + /* Specialization for hb_vector_t> to speed up. */ template ))> + hb_enable_if (hb_is_same (T, hb_vector_t) || + hb_is_same (T, hb_array_t ))> void grow_vector (unsigned size, hb_priority<1>) {