diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 2c1c49b15..8e57a683e 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -304,6 +304,10 @@ struct _hb_has_null template struct OffsetTo : Offset { + // Make sure Type is not unbounded; works only for types that are fully defined at OffsetTo time. + static_assert (has_null == false || + (hb_has_null_size (Type) || !hb_has_min_size (Type)), ""); + HB_DELETE_COPY_ASSIGN (OffsetTo); OffsetTo () = default;