[meta] Don't use template default arguments for functions

That's a C++11 extension apparently...
This commit is contained in:
Behdad Esfahbod 2018-12-28 20:01:57 -05:00
parent b89d20dd9f
commit 3d22900f62
2 changed files with 5 additions and 5 deletions

View File

@ -55,7 +55,7 @@ template<typename T>
struct hb_enable_if<true, T> { typedef T type; };
#define hb_enable_if(Cond) typename hb_enable_if<Cond>::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
/*

View File

@ -552,10 +552,10 @@ struct ArrayOf
if (unlikely (!c->extend (*this))) return_trace (false);
return_trace (true);
}
template <typename Iterator,
hb_enable_if (hb_is_iterator (Iterator))>
bool serialize (hb_serialize_context_t *c,
Iterator items)
template <typename Iterator>
hb_enable_if_t (hb_is_iterator (Iterator),
bool) serialize (hb_serialize_context_t *c,
Iterator items)
{
TRACE_SERIALIZE (this);
unsigned count = items.len ();