[iter] Rewrite test functions
Notably, add hb_is_source_of(,) and hb_is_sink_of(,) to replace most
uses of hb_is_iterator_of(,).
diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh
index 5fa1164..a7e10ed 100644
--- a/src/hb-open-type.hh
+++ b/src/hb-open-type.hh
@@ -419,7 +419,7 @@
return_trace (true);
}
template <typename Iterator,
- hb_requires (hb_is_iterator_of (Iterator, const Type))>
+ hb_requires (hb_is_source_of (Iterator, Type))>
bool serialize (hb_serialize_context_t *c, Iterator items)
{
TRACE_SERIALIZE (this);
@@ -598,7 +598,7 @@
return_trace (true);
}
template <typename Iterator,
- hb_requires (hb_is_iterator_of (Iterator, const Type))>
+ hb_requires (hb_is_source_of (Iterator, Type))>
bool serialize (hb_serialize_context_t *c, Iterator items)
{
TRACE_SERIALIZE (this);
@@ -877,7 +877,7 @@
return_trace (ret);
}
template <typename Iterator,
- hb_requires (hb_is_sorted_iterator_of (Iterator, const Type))>
+ hb_requires (hb_is_sorted_source_of (Iterator, Type))>
bool serialize (hb_serialize_context_t *c, Iterator items)
{
TRACE_SERIALIZE (this);
@@ -885,7 +885,6 @@
return_trace (ret);
}
-
template <typename T>
Type &bsearch (const T &x, Type ¬_found = Crap (Type))
{ return *as_array ().bsearch (x, ¬_found); }