From 8479eb5955c93cbc8951d0319b2fe43ff19cc403 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 May 2019 09:48:55 -0700 Subject: [PATCH] [iter] Fix hb_sink() to accept rvalue --- src/hb-iter.hh | 2 +- src/test-iter.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index aa5eb9c..a339013 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -569,7 +569,7 @@ HB_FUNCOBJ (hb_apply); template struct hb_sink_t { - hb_sink_t (Sink&& s) : s (s) {} + hb_sink_t (Sink s) : s (s) {} template diff --git a/src/test-iter.cc b/src/test-iter.cc index 17a1972..fe3c8f3 100644 --- a/src/test-iter.cc +++ b/src/test-iter.cc @@ -186,6 +186,10 @@ main (int argc, char **argv) ; + hb_iter (src) + | hb_sink (hb_array (dst)) + ; + + + hb_iter (src) | hb_apply (&st) ; -- 2.7.4