[iter] Accept iterator, not iterable, in hb_sink()()
This commit is contained in:
parent
0f292ea85f
commit
5fa52e62b1
|
@ -371,12 +371,12 @@ struct hb_sink_t
|
||||||
{
|
{
|
||||||
hb_sink_t (Sink&& s) : s (s) {}
|
hb_sink_t (Sink&& s) : s (s) {}
|
||||||
|
|
||||||
template <typename Iterable,
|
template <typename Iter,
|
||||||
hb_enable_if (hb_is_iterable (Iterable))>
|
hb_enable_if (hb_is_iterator (Iter))>
|
||||||
void
|
void
|
||||||
operator () (const Iterable &c) const
|
operator () (Iter it) const
|
||||||
{
|
{
|
||||||
for (auto it = c.iter (); it; ++it)
|
for (; it; ++it)
|
||||||
s << *it;
|
s << *it;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,7 @@ main (int argc, char **argv)
|
||||||
| hb_filter ()
|
| hb_filter ()
|
||||||
| hb_filter (hb_bool)
|
| hb_filter (hb_bool)
|
||||||
| hb_filter (hb_bool, hb_identity)
|
| hb_filter (hb_bool, hb_identity)
|
||||||
|
| hb_sink (st)
|
||||||
;
|
;
|
||||||
|
|
||||||
t << 1;
|
t << 1;
|
||||||
|
|
Loading…
Reference in New Issue