diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index 75ff456ac..f79a3f856 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -36,6 +36,23 @@ typedef const struct _hb_void_t *hb_void_t; #define HB_VOID ((const _hb_void_t *) nullptr) +/* + * Pair + */ + +template +struct hb_pair_t +{ + hb_pair_t (const T1& a, const T2& b) : first (a), second (b) {} + hb_pair_t (const hb_pair_t& o) : hb_pair_t (o.first, o.second) {} + + T1 first; + T2 second; +}; +template static inline hb_pair_t +hb_pair (T1 a, T2 b) { return hb_pair_t (a, b); } + + /* * Bithacks. */