diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index fcf1047b9ae06b7724d6d0d6a9897ac1be2537c7..c150fe2a33e86781b299a22eb23957befa71d61b 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -279,15 +279,6 @@ struct OffsetTo : Offset return StructAtOffset (base, *this); } - template - friend const Type& operator + (const Base *base, const OffsetTo &offset) { return offset (base); } - template - friend const Type& operator + (const OffsetTo &offset, const Base *base) { return offset (base); } - template - friend Type& operator + (Base *base, OffsetTo &offset) { return offset (base); } - template - friend Type& operator + (OffsetTo &offset, Base *base) { return offset (base); } - Type& serialize (hb_serialize_context_t *c, const void *base) { return * (Type *) Offset::serialize (c, base); @@ -366,6 +357,15 @@ using NNOffsetTo = OffsetTo; template using LNNOffsetTo = LOffsetTo; +template +static inline const Type& operator + (const Base *base, const OffsetTo &offset) { return offset (base); } +template +static inline const Type& operator + (const OffsetTo &offset, const Base *base) { return offset (base); } +template +static inline Type& operator + (Base *base, OffsetTo &offset) { return offset (base); } +template +static inline Type& operator + (OffsetTo &offset, Base *base) { return offset (base); } + /* * Array Types