From 343e6063dcd512164a999f1d12bae50877392a82 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 28 Mar 2019 21:44:12 -0700 Subject: [PATCH] Add hb_is_integer(T) --- src/hb-meta.hh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/hb-meta.hh b/src/hb-meta.hh index af7e5ccd9..6d9dd6b6c 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -104,5 +104,19 @@ template <> struct hb_signedness_int { typedef unsigned int value; }; template <> struct hb_signedness_int { typedef signed int value; }; #define hb_signedness_int(T) hb_signedness_int::value +template struct hb_is_integer { enum { value = false }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +template <> struct hb_is_integer { enum { value = true }; }; +#define hb_is_integer(T) hb_is_integer::value + #endif /* HB_META_HH */