From 1198fb24686d1ea268f9923d3238fe6c2afb2d97 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 16 Jan 2022 06:29:35 -0700 Subject: [PATCH] [vector] Adjust construction criteria --- src/hb-vector.hh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 9fb477cb0..f5df8364f 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -233,7 +233,8 @@ struct hb_vector_t } template ::value)> + hb_enable_if (std::is_trivially_constructible::value || + !std::is_default_constructible::value)> void grow_vector (unsigned size) { @@ -241,7 +242,8 @@ struct hb_vector_t length = size; } template ::value)> + hb_enable_if (!std::is_trivially_constructible::value && + std::is_default_constructible::value)> void grow_vector (unsigned size) { @@ -253,14 +255,14 @@ struct hb_vector_t } template ::value)> + hb_enable_if (std::is_trivially_destructible::value)> void shrink_vector (unsigned size) { length = size; } template ::value)> + hb_enable_if (!std::is_trivially_destructible::value)> void shrink_vector (unsigned size) {