提交 38e3a8bd 编写于 作者: B Behdad Esfahbod

[meta] bool_tt -> bool_constant

上级 3919ca41
......@@ -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. */
......
......@@ -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>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册