[meta] Replace hb_is_pointer with std::is_pointer
This commit is contained in:
parent
956e0a4d13
commit
47afb3ef04
|
@ -214,7 +214,7 @@ HB_FUNCOBJ (hb_bool);
|
|||
template <typename T>
|
||||
T hb_coerce (const T v) { return v; }
|
||||
template <typename T, typename V,
|
||||
hb_enable_if (!hb_is_same (hb_decay<T>, hb_decay<V>) && hb_is_pointer(V))>
|
||||
hb_enable_if (!hb_is_same (hb_decay<T>, hb_decay<V>) && std::is_pointer<V>::value)>
|
||||
T hb_coerce (const V v) { return *v; }
|
||||
|
||||
struct
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
template <typename K, typename V,
|
||||
typename k_invalid_t = K,
|
||||
typename v_invalid_t = V,
|
||||
k_invalid_t kINVALID = hb_is_pointer (K) ? 0 : std::is_signed<K>::value ? hb_int_min (K) : (K) -1,
|
||||
v_invalid_t vINVALID = hb_is_pointer (V) ? 0 : std::is_signed<V>::value ? hb_int_min (V) : (V) -1>
|
||||
k_invalid_t kINVALID = std::is_pointer<K>::value ? 0 : std::is_signed<K>::value ? hb_int_min (K) : (K) -1,
|
||||
v_invalid_t vINVALID = std::is_pointer<V>::value ? 0 : std::is_signed<V>::value ? hb_int_min (V) : (V) -1>
|
||||
struct hb_hashmap_t
|
||||
{
|
||||
hb_hashmap_t () { init (); }
|
||||
|
|
|
@ -126,7 +126,6 @@ template <typename T> using hb_remove_pointer = typename hb_match_pointer<T>::ty
|
|||
template <typename T> auto _hb_try_add_pointer (hb_priority<1>) -> hb_type_identity<hb_remove_reference<T>*>;
|
||||
template <typename T> auto _hb_try_add_pointer (hb_priority<1>) -> hb_type_identity<T>;
|
||||
template <typename T> using hb_add_pointer = decltype (_hb_try_add_pointer<T> (hb_prioritize));
|
||||
#define hb_is_pointer(T) hb_match_pointer<T>::value
|
||||
|
||||
|
||||
/* TODO Add feature-parity to std::decay. */
|
||||
|
|
Loading…
Reference in New Issue