add hb_get_type
This commit is contained in:
parent
6585846352
commit
71552ecc26
@ -396,5 +396,17 @@ using hb_is_trivial= hb_bool_constant<
|
||||
>;
|
||||
#define hb_is_trivial(T) hb_is_trivial<T>::value
|
||||
|
||||
/* hb_get_type (T)
|
||||
* Returns T::type if T::type is typedef'ed, or T otherwise.
|
||||
*/
|
||||
|
||||
template <typename T, typename>
|
||||
struct _hb_get_type : hb_type_identity_t<T> {};
|
||||
template <typename T>
|
||||
struct _hb_get_type<T, hb_void_t<typename T::type>> : hb_type_identity_t<typename T::type> {};
|
||||
template <typename T>
|
||||
using hb_get_type = _hb_get_type<T, void>;
|
||||
#define hb_get_type(T) typename hb_get_type<T>::type
|
||||
|
||||
|
||||
#endif /* HB_META_HH */
|
||||
|
Loading…
Reference in New Issue
Block a user