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, "")