diff --git a/src/hb-meta.hh b/src/hb-meta.hh index f13b256ee..d995607f4 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -228,6 +228,25 @@ struct hb_reference_wrapper }; +template struct hb_is_integral { static constexpr bool value = false;}; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; +template <> struct hb_is_integral { static constexpr bool value = true; }; + +template struct hb_is_floating_point { static constexpr bool value = false;}; +template <> struct hb_is_floating_point { static constexpr bool value = true; }; +template <> struct hb_is_floating_point { static constexpr bool value = true; }; +template <> struct hb_is_floating_point { static constexpr bool value = true; }; + +#define hb_is_integral(T) hb_is_integral::value template struct hb_is_signed; template <> struct hb_is_signed { static constexpr bool value = CHAR_MIN < 0; }; template <> struct hb_is_signed { static constexpr bool value = true; }; @@ -277,19 +296,5 @@ 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_integral { static constexpr bool value = false;}; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -template <> struct hb_is_integral { static constexpr bool value = true; }; -#define hb_is_integral(T) hb_is_integral::value - #endif /* HB_META_HH */