[meta] Add is_signed for floating point types
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 02:49:26 +0000 (19:49 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 02:52:36 +0000 (19:52 -0700)
src/hb-meta.hh

index 290b41c..f13b256 100644 (file)
@@ -240,6 +240,9 @@ template <> struct hb_is_signed<signed long>                { static constexpr bool value = tr
 template <> struct hb_is_signed<unsigned long>         { static constexpr bool value = false;          };
 template <> struct hb_is_signed<signed long long>      { static constexpr bool value = true;           };
 template <> struct hb_is_signed<unsigned long long>    { static constexpr bool value = false;          };
+template <> struct hb_is_signed<float>                 { static constexpr bool value = true;           };
+template <> struct hb_is_signed<double>                        { static constexpr bool value = true;           };
+template <> struct hb_is_signed<long double>           { static constexpr bool value = true;           };
 #define hb_is_signed(T) hb_is_signed<T>::value
 
 template <typename T> struct hb_int_min;