[algs] Add default-construtor to hb_pair_t

This commit is contained in:
Behdad Esfahbod 2022-01-16 06:59:24 -07:00
parent e2e305066a
commit c0f57ccc88
1 changed files with 4 additions and 0 deletions

View File

@ -482,6 +482,10 @@ struct hb_pair_t
typedef T2 second_t;
typedef hb_pair_t<T1, T2> pair_t;
template <typename U1 = T1, typename U2 = T2,
hb_enable_if (std::is_default_constructible<U1>::value &&
std::is_default_constructible<U2>::value)>
hb_pair_t () : first (), second () {}
hb_pair_t (T1 a, T2 b) : first (a), second (b) {}
template <typename Q1, typename Q2,