diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 4035bb458..0eb8e2d75 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -275,6 +275,22 @@ struct hb_vector_t : std::conditional, hb_empty new (std::addressof (arrayZ[length - 1])) Type (other.arrayZ[length - 1]); } } + template ::value && + std::is_default_constructible::value && + std::is_copy_assignable::value)> + void + copy_vector (const hb_vector_t &other) + { + length = 0; + while (length < other.length) + { + length++; + new (std::addressof (arrayZ[length - 1])) Type (); + arrayZ[length - 1] = other.arrayZ[length - 1]; + } + } template