diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index ec7b5db89..ee2723aad 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -279,10 +279,12 @@ struct OffsetTo : Offset return StructAtOffset (base, *this); } - template - friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset (base); } - template - friend Type& operator + (Base &base, OffsetTo &offset) { return offset (base); } + template + friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset ((const void *) base); } + template + friend Type& operator + (Base &&base, OffsetTo &offset) { return offset ((void *) base); } Type& serialize (hb_serialize_context_t *c, const void *base) {