diff --git a/src/hb-meta.hh b/src/hb-meta.hh index 0a711e10b..6646d284e 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -55,7 +55,7 @@ template struct hb_enable_if { typedef T type; }; #define hb_enable_if(Cond) typename hb_enable_if::type* = nullptr -#define hb_enable_if_t(Type, Cond) hb_enable_if<(Cond), Type>::type +#define hb_enable_if_t(Cond, Type) typename hb_enable_if<(Cond), Type>::type /* diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 41cd0c064..a1e30d202 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -552,10 +552,10 @@ struct ArrayOf if (unlikely (!c->extend (*this))) return_trace (false); return_trace (true); } - template - bool serialize (hb_serialize_context_t *c, - Iterator items) + template + hb_enable_if_t (hb_is_iterator (Iterator), + bool) serialize (hb_serialize_context_t *c, + Iterator items) { TRACE_SERIALIZE (this); unsigned count = items.len ();