From 3d22900f6251b4386d8a7dfd7e2118dd75f12763 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 28 Dec 2018 20:01:57 -0500 Subject: [PATCH] [meta] Don't use template default arguments for functions That's a C++11 extension apparently... --- src/hb-meta.hh | 2 +- src/hb-open-type.hh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 ();