[iter] Fix hb_sink() to accept rvalue

This commit is contained in:
Behdad Esfahbod 2019-05-08 09:48:55 -07:00
parent 710d459aca
commit 8479eb5955
2 changed files with 5 additions and 1 deletions

View File

@ -569,7 +569,7 @@ HB_FUNCOBJ (hb_apply);
template <typename Sink>
struct hb_sink_t
{
hb_sink_t (Sink&& s) : s (s) {}
hb_sink_t (Sink s) : s (s) {}
template <typename Iter,
hb_requires (hb_is_iterator (Iter))>

View File

@ -185,6 +185,10 @@ main (int argc, char **argv)
| hb_sink (st)
;
+ hb_iter (src)
| hb_sink (hb_array (dst))
;
+ hb_iter (src)
| hb_apply (&st)
;