提交 c58eeb5f 编写于 作者: B Behdad Esfahbod

Another try at fix

Fails locally.  Trying to understand.  Sigh
上级 004edf3b
......@@ -279,6 +279,15 @@ struct OffsetTo : Offset<OffsetType, has_null>
return StructAtOffset<Type> (base, *this);
}
template <typename Base>
friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset (base); }
template <typename Base>
friend const Type& operator + (const OffsetTo &offset, const Base &base) { return offset (base); }
template <typename Base>
friend Type& operator + (Base &base, OffsetTo &offset) { return offset (base); }
template <typename Base>
friend Type& operator + (OffsetTo &offset, Base &base) { return offset (base); }
Type& serialize (hb_serialize_context_t *c, const void *base)
{
return * (Type *) Offset<OffsetType>::serialize (c, base);
......@@ -357,15 +366,6 @@ using NNOffsetTo = OffsetTo<Type, OffsetType, false>;
template <typename Type>
using LNNOffsetTo = LOffsetTo<Type, false>;
template <typename Base, typename Type, typename OffsetType, bool has_null>
static inline const Type& operator + (const Base *base, const OffsetTo<Type, OffsetType, has_null> &offset) { return offset (base); }
template <typename Base, typename Type, typename OffsetType, bool has_null>
static inline const Type& operator + (const OffsetTo<Type, OffsetType, has_null> &offset, const Base *base) { return offset (base); }
template <typename Base, typename Type, typename OffsetType, bool has_null>
static inline Type& operator + (Base *base, OffsetTo<Type, OffsetType, has_null> &offset) { return offset (base); }
template <typename Base, typename Type, typename OffsetType, bool has_null>
static inline Type& operator + (OffsetTo<Type, OffsetType, has_null> &offset, Base *base) { return offset (base); }
/*
* Array Types
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册