From dfa5e4297147b52f0ed2f569c9b90a0c68c003c4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 15 May 2019 21:18:14 -0700 Subject: [PATCH] Add back symmetric OffsetTo<>::friend operator+ Finally seems to be working now. --- src/hb-open-type.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index ee2723aad..896f7a015 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -282,9 +282,15 @@ struct OffsetTo : Offset template friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset ((const void *) base); } + template + friend const Type& operator + (const OffsetTo &offset, const Base &base) { return offset ((const void *) base); } template friend Type& operator + (Base &&base, OffsetTo &offset) { return offset ((void *) base); } + template + friend Type& operator + (OffsetTo &offset, Base &&base) { return offset ((void *) base); } Type& serialize (hb_serialize_context_t *c, const void *base) {