From c9d8a07e30d05b870c3d2374853adba019601b02 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 2 Jan 2019 16:43:52 -0500 Subject: [PATCH] [iter] Add hb_iter_of_t<> --- src/hb-iter.hh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 4cdad76e8..8beaa5583 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -48,9 +48,11 @@ * Base classes for iterators. */ +template struct hb_iter_of_t {}; + /* Base class for all iterators. */ template -struct hb_iter_t +struct hb_iter_t : hb_iter_of_t { typedef Iter iter_t; typedef Item item_t; @@ -161,11 +163,11 @@ struct hb_is_iterable { enum { value = _hb_is_iterable::value }; } /* hb_is_iterator() / hb_is_sorted_iterator() */ -template char _hb_is_iterator (...) {}; -template int _hb_is_iterator (hb_iter_t *) {}; -template int _hb_is_iterator (hb_iter_t *) {}; -template int _hb_is_iterator (hb_iter_t *) {}; -template int _hb_is_iterator (hb_iter_t *) {}; +template char _hb_is_iterator (...) {}; +template int _hb_is_iterator (hb_iter_of_t *) {}; +template int _hb_is_iterator (hb_iter_of_t *) {}; +template int _hb_is_iterator (hb_iter_of_t *) {}; +template int _hb_is_iterator (hb_iter_of_t *) {}; static_assert (sizeof (char) != sizeof (int), ""); template struct hb_is_iterator { enum {