diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 62758758c..0354845c4 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -90,7 +90,8 @@ struct hb_vector_t explicit operator bool () const { return length; } /* Sink interface. */ - hb_vector_t& operator << (const Type &v) { push (v); return *this; } + template + hb_vector_t& operator << (const T& v) { push (v); return *this; } hb_array_t< Type> as_array () { return hb_array (arrayZ(), length); } hb_array_t as_array () const { return hb_array (arrayZ(), length); } @@ -129,7 +130,8 @@ struct hb_vector_t return &Crap(Type); return &arrayZ()[length - 1]; } - Type *push (const Type& v) + template + Type *push (const T& v) { Type *p = push (); *p = v;