diff --git a/src/hb-private.hh b/src/hb-private.hh index 4a8f795e4..e3ca2aee1 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -605,6 +605,17 @@ static inline Type& Crap (void) { } #define Crap(Type) Crap() +template +struct CrapOrNull { + static inline Type & get (void) { return Crap(Type); } +}; +template +struct CrapOrNull { + static inline Type const & get (void) { return Null(Type); } +}; +#define CrapOrNull(Type) CrapOrNull::get () + + /* arrays and maps */