From 26adefd9eaf4bc1d80b1ffececf0d86f3308f9ee Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 May 2019 09:14:44 -0700 Subject: [PATCH] [algs] Try f[v] in hb_get() as last resort --- src/hb-algs.hh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index 9e8a4ae..b83ee6a 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -100,16 +100,22 @@ struct private: template auto - impl (Proj&& f, Val &&v, hb_priority<1>) const HB_AUTO_RETURN + impl (Proj&& f, Val &&v, hb_priority<2>) const HB_AUTO_RETURN (hb_deref (hb_forward (f)).get (hb_forward (v))) template auto - impl (Proj&& f, Val &&v, hb_priority<0>) const HB_AUTO_RETURN + impl (Proj&& f, Val &&v, hb_priority<1>) const HB_AUTO_RETURN ( hb_invoke (hb_forward (f), hb_forward (v)) ) + template auto + impl (Proj&& f, Val &&v, hb_priority<0>) const HB_AUTO_RETURN + ( + hb_forward (f)[hb_forward (v)] + ) + public: template auto -- 2.7.4