[meta] bool_tt -> bool_constant

This commit is contained in:
Behdad Esfahbod 2019-05-10 20:03:14 -07:00
parent 3919ca41b5
commit 38e3a8bd53
2 changed files with 5 additions and 5 deletions

View File

@ -47,9 +47,9 @@ template<typename... Ts> using hb_head_tt = typename _hb_head_tt<Ts...>::type;
/* Bool! For when we need to evaluate type-dependent expressions
* in a template argument. */
template <bool b> struct hb_bool_tt { static constexpr bool value = b; };
typedef hb_bool_tt<true> hb_true_t;
typedef hb_bool_tt<false> hb_false_t;
template <bool b> struct hb_bool_constant { static constexpr bool value = b; };
typedef hb_bool_constant<true> hb_true_t;
typedef hb_bool_constant<false> hb_false_t;
/* Basic type SFINAE. */

View File

@ -50,7 +50,7 @@ template <typename T, typename B>
struct _hb_null_size
{ enum { value = sizeof (T) }; };
template <typename T>
struct _hb_null_size<T, hb_bool_tt<true || sizeof (T::min_size)>>
struct _hb_null_size<T, hb_bool_constant<true || sizeof (T::min_size)>>
{ enum { value = T::null_size }; };
template <typename T>
@ -67,7 +67,7 @@ template <typename T, typename B>
struct _hb_static_size
{ enum { value = sizeof (T) }; };
template <typename T>
struct _hb_static_size<T, hb_bool_tt<true || sizeof (T::min_size)>>
struct _hb_static_size<T, hb_bool_constant<true || sizeof (T::min_size)>>
{ enum { value = T::static_size }; };
template <typename T>