[iter] Add hb_sorted_iter_t<>

This commit is contained in:
Behdad Esfahbod 2018-12-21 19:55:02 -05:00
parent b205105c9e
commit 954b985422
2 changed files with 12 additions and 1 deletions

View File

@ -190,7 +190,7 @@ enum hb_bfind_not_found_t
template <typename Type> template <typename Type>
struct hb_sorted_array_t : struct hb_sorted_array_t :
hb_iter_t<hb_sorted_array_t<Type>, Type>, hb_sorted_iter_t<hb_sorted_array_t<Type>, Type>,
hb_array_t<Type>, hb_array_t<Type>,
hb_iter_mixin_t<hb_sorted_array_t<Type>, Type> hb_iter_mixin_t<hb_sorted_array_t<Type>, Type>
{ {

View File

@ -89,6 +89,17 @@ struct hb_iter_t
void operator = (const hb_iter_t &o) {} void operator = (const hb_iter_t &o) {}
}; };
/* Base class for sorted iterators. Does not enforce anything.
* Just for class taxonomy and requirements. */
template <typename Iter, typename Item = typename Iter::__item_type__>
struct hb_sorted_iter_t : hb_iter_t<Iter, Item>
{
protected:
hb_sorted_iter_t () {}
hb_sorted_iter_t (const hb_sorted_iter_t &o) {}
void operator = (const hb_sorted_iter_t &o) {}
};
/* Mixin to fill in what the subclass doesn't provide. */ /* Mixin to fill in what the subclass doesn't provide. */
template <typename iter_t, typename item_t = typename iter_t::__item_type__> template <typename iter_t, typename item_t = typename iter_t::__item_type__>
struct hb_iter_mixin_t struct hb_iter_mixin_t