From 5ceaafa5de8dff51fe91f7008a12ec9c304a1376 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 May 2019 14:59:25 -0700 Subject: [PATCH] [algs] Fix identity return type --- src/hb-algs.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index 52d40923e..d377772e0 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -36,15 +36,15 @@ struct { - template T - operator () (const T& v) const { return v; } + template auto + operator () (T&& v) const HB_AUTO_RETURN ( hb_forward (v) ) } HB_FUNCOBJ (hb_identity); struct { template bool - operator () (const T& v) const { return bool (v); } + operator () (T&& v) const { return bool (hb_forward (v)); } } HB_FUNCOBJ (hb_bool);