From 5a1b5c0a8b91a2291e7327e84acba2406a14414e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 31 May 2019 21:08:39 -0700 Subject: [PATCH] Try fixing VS builds Hopefully fixes https://github.com/harfbuzz/harfbuzz/issues/1730 --- src/hb-algs.hh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index 5fe9b0321..7f5e4d8ff 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -169,7 +169,12 @@ auto hb_partial (Appl&& a, V&& v) HB_AUTO_RETURN #define HB_PARTIALIZE(Pos) \ template \ - auto operator () (_T&& _v) const HB_AUTO_RETURN (hb_partial (this, hb_forward<_T> (_v))) \ + auto operator () (_T&& _v) const HB_AUTO_RETURN \ + (hb_partial ( \ + /* The following ugly line is a hack hacky replacement for "this". */ \ + /* https://github.com/harfbuzz/harfbuzz/issues/1730 */ \ + const_cast *> (this), \ + hb_forward<_T> (_v))) \ static_assert (true, "")