[array] Add default methods again, this time the full set

Should add tests.
This commit is contained in:
Behdad Esfahbod 2021-11-19 11:49:03 -07:00
parent a75b96f7e5
commit cba17fd101
1 changed files with 10 additions and 0 deletions

View File

@ -51,6 +51,11 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
* Constructors. * Constructors.
*/ */
hb_array_t () = default; hb_array_t () = default;
hb_array_t (const hb_array_t&) = default;
~hb_array_t () = default;
hb_array_t& operator= (const hb_array_t&) = default;
hb_array_t& operator= (hb_array_t&&) = default;
hb_array_t (Type *array_, unsigned int length_) : arrayZ (array_), length (length_) {} hb_array_t (Type *array_, unsigned int length_) : arrayZ (array_), length (length_) {}
template <unsigned int length_> template <unsigned int length_>
hb_array_t (Type (&array_)[length_]) : hb_array_t (array_, length_) {} hb_array_t (Type (&array_)[length_]) : hb_array_t (array_, length_) {}
@ -303,6 +308,11 @@ struct hb_sorted_array_t :
static constexpr bool is_sorted_iterator = true; static constexpr bool is_sorted_iterator = true;
hb_sorted_array_t () = default; hb_sorted_array_t () = default;
hb_sorted_array_t (const hb_sorted_array_t&) = default;
~hb_sorted_array_t () = default;
hb_sorted_array_t& operator= (const hb_sorted_array_t&) = default;
hb_sorted_array_t& operator= (hb_sorted_array_t&&) = default;
hb_sorted_array_t (Type *array_, unsigned int length_) : hb_array_t<Type> (array_, length_) {} hb_sorted_array_t (Type *array_, unsigned int length_) : hb_array_t<Type> (array_, length_) {}
template <unsigned int length_> template <unsigned int length_>
hb_sorted_array_t (Type (&array_)[length_]) : hb_array_t<Type> (array_) {} hb_sorted_array_t (Type (&array_)[length_]) : hb_array_t<Type> (array_) {}