[array] Add constructor from fixed-size array
This commit is contained in:
parent
a4354d2fd3
commit
68d4a5eee0
|
@ -46,6 +46,7 @@ struct hb_array_t
|
|||
hb_array_t (const hb_array_t &o) : arrayZ (o.arrayZ), len (o.len) {}
|
||||
hb_array_t (hb_array_t<const Type> o) : arrayZ (o.arrayZ), len (o.len) {}
|
||||
hb_array_t (Type *array_, unsigned int len_) : arrayZ (array_), len (len_) {}
|
||||
template <unsigned int len_> hb_array_t (Type (&array_)[len_]) : arrayZ (array_), len (len_) {}
|
||||
|
||||
/*
|
||||
* Operators.
|
||||
|
|
|
@ -54,7 +54,7 @@ struct Iter;
|
|||
template <typename T>
|
||||
struct Iter
|
||||
{
|
||||
explicit inline Iter (const T &c);
|
||||
Iter (const T &c);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -68,7 +68,7 @@ struct Iter<T *>
|
|||
Iter (T *array_, int length_) :
|
||||
array (array_), length (MAX (length_, 0)) {}
|
||||
template <unsigned int length_>
|
||||
explicit inline Iter (T (&array_)[length_]) :
|
||||
Iter (T (&array_)[length_]) :
|
||||
array (array_), length (length_) {}
|
||||
|
||||
/* Emptiness. */
|
||||
|
|
Loading…
Reference in New Issue