Add back symmetric OffsetTo<>::friend operator+

Finally seems to be working now.
This commit is contained in:
Behdad Esfahbod 2019-05-15 21:18:14 -07:00
parent a06a236891
commit dfa5e42971
1 changed files with 6 additions and 0 deletions

View File

@ -282,9 +282,15 @@ struct OffsetTo : Offset<OffsetType, has_null>
template <typename Base,
hb_enable_if (hb_is_convertible (const Base, const void *))>
friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset ((const void *) base); }
template <typename Base,
hb_enable_if (hb_is_convertible (const Base, const void *))>
friend const Type& operator + (const OffsetTo &offset, const Base &base) { return offset ((const void *) base); }
template <typename Base,
hb_enable_if (hb_is_convertible (Base, void *))>
friend Type& operator + (Base &&base, OffsetTo &offset) { return offset ((void *) base); }
template <typename Base,
hb_enable_if (hb_is_convertible (Base, void *))>
friend Type& operator + (OffsetTo &offset, Base &&base) { return offset ((void *) base); }
Type& serialize (hb_serialize_context_t *c, const void *base)
{