From 168ceeac496f15b4c81b106cfb790dd5739a0143 Mon Sep 17 00:00:00 2001 From: ariza Date: Fri, 14 Feb 2020 11:56:56 -0800 Subject: [PATCH] renamed to hb_unrwap_type(); now recursive --- src/hb-meta.hh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/hb-meta.hh b/src/hb-meta.hh index ef3dd62ea..c08b191f1 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -396,17 +396,16 @@ using hb_is_trivial= hb_bool_constant< >; #define hb_is_trivial(T) hb_is_trivial::value -/* hb_get_type (T) - * Returns T::type if T::type is typedef'ed, or T otherwise. +/* hb_unwrap_type (T) + * If T has no T::type, returns T. Otherwise calls itself on T::type recursively. */ template -struct _hb_get_type : hb_type_identity_t {}; +struct _hb_unwrap_type : hb_type_identity_t {}; template -struct _hb_get_type> : hb_type_identity_t {}; +struct _hb_unwrap_type> : _hb_unwrap_type {}; template -using hb_get_type = _hb_get_type; -#define hb_get_type(T) typename hb_get_type::type - +using hb_unwrap_type = _hb_unwrap_type; +#define hb_unwrap_type(T) typename hb_unwrap_type::type #endif /* HB_META_HH */