[iter] Accept iterator, not iterable, in hb_sink()()

This commit is contained in:
Behdad Esfahbod committed 2019-02-14 10:51:02 -08:00
1 parent 0f292ea85f
commit 5fa52e62b1
2 files changed
+5 -4

No files matched your search

+4 -4
View File
@@ -371,12 +371,12 @@ struct hb_sink_t
{
hb_sink_t (Sink&& s) : s (s) {}
template <typename Iterable,
hb_enable_if (hb_is_iterable (Iterable))>
template <typename Iter,
hb_enable_if (hb_is_iterator (Iter))>
void
operator () (const Iterable &c) const
operator () (Iter it) const
{
for (auto it = c.iter (); it; ++it)
for (; it; ++it)
s << *it;
}
+1
View File
@@ -145,6 +145,7 @@ main (int argc, char **argv)
| hb_filter ()
| hb_filter (hb_bool)
| hb_filter (hb_bool, hb_identity)
| hb_sink (st)
;
t << 1;