From c58eeb5fb35ec6a8d0a4394fd83cb2571cd5af4f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 15 May 2019 01:10:31 -0700 Subject: [PATCH] Another try at fix Fails locally. Trying to understand. Sigh --- src/hb-open-type.hh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 9d6e1e51f..1471f5120 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -279,6 +279,15 @@ 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); @@ -357,15 +366,6 @@ 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