diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 7b975e6b62029f99ed2ec4a434a204a16383f49b..5c02a27f35c0e5e091c017571dda29c494338c61 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -161,15 +161,19 @@ struct hb_is_iterable { enum { value = _hb_is_iterable::value }; } /* hb_is_iterator() / hb_is_sorted_iterator() */ -template char _hb_is_iterator (...) { return 0; }; -template int _hb_is_iterator (hb_iter_t *) { return 0; }; -template int _hb_is_iterator (hb_iter_t *) { return 0; }; -template int _hb_is_iterator (hb_iter_t *) { return 0; }; -template int _hb_is_iterator (hb_iter_t *) { return 0; }; -static_assert (sizeof (char) != sizeof (int), ""); +template +struct _hb_is_iterator +{ + char operator () (...) { return 0; }; + template int operator () (hb_iter_t *) { return 0; }; + template int operator () (hb_iter_t *) { return 0; }; + template int operator () (hb_iter_t *) { return 0; }; + template int operator () (hb_iter_t *) { return 0; }; + static_assert (sizeof (char) != sizeof (int), ""); +}; template struct hb_is_iterator { enum { - value = sizeof (int) == sizeof (_hb_is_iterator (hb_declval ())) }; }; + value = sizeof (int) == sizeof (hb_declval<_hb_is_iterator> () (hb_declval ())) }; }; #define hb_is_iterator(Iter, Item) hb_is_iterator::value #define hb_is_sorted_iterator(Iter, Item) \