[meta] Rewrite is_base_of

This commit is contained in:
Behdad Esfahbod 2019-05-10 20:15:03 -07:00
parent 5a171ed3a6
commit b4ad6af9c4
1 changed files with 1 additions and 4 deletions

View File

@ -158,10 +158,7 @@ struct hb_is_convertible
#define hb_is_convertible(From,To) hb_is_convertible<From, To>::value #define hb_is_convertible(From,To) hb_is_convertible<From, To>::value
template <typename Base, typename Derived> template <typename Base, typename Derived>
struct hb_is_base_of using hb_is_base_of = hb_is_convertible<hb_decay<Derived> *, hb_decay<Base> *>;
{
static constexpr bool value = hb_is_convertible (hb_decay<Derived> *, hb_decay<Base> *);
};
#define hb_is_base_of(Base,Derived) hb_is_base_of<Base, Derived>::value #define hb_is_base_of(Base,Derived) hb_is_base_of<Base, Derived>::value
template <typename From, typename To> template <typename From, typename To>