[iter] Fix hb_sink() to accept rvalue
This commit is contained in:
parent
710d459aca
commit
8479eb5955
|
@ -569,7 +569,7 @@ HB_FUNCOBJ (hb_apply);
|
||||||
template <typename Sink>
|
template <typename Sink>
|
||||||
struct hb_sink_t
|
struct hb_sink_t
|
||||||
{
|
{
|
||||||
hb_sink_t (Sink&& s) : s (s) {}
|
hb_sink_t (Sink s) : s (s) {}
|
||||||
|
|
||||||
template <typename Iter,
|
template <typename Iter,
|
||||||
hb_requires (hb_is_iterator (Iter))>
|
hb_requires (hb_is_iterator (Iter))>
|
||||||
|
|
|
@ -185,6 +185,10 @@ main (int argc, char **argv)
|
||||||
| hb_sink (st)
|
| hb_sink (st)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
+ hb_iter (src)
|
||||||
|
| hb_sink (hb_array (dst))
|
||||||
|
;
|
||||||
|
|
||||||
+ hb_iter (src)
|
+ hb_iter (src)
|
||||||
| hb_apply (&st)
|
| hb_apply (&st)
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue