From 086772e409759e8f1edd0e34f6f25374e51e9e10 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 May 2019 21:49:25 -0700 Subject: [PATCH] [meta] Add is_destructible --- src/hb-meta.hh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/hb-meta.hh b/src/hb-meta.hh index 0ab7179..47cefa8 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -292,6 +292,15 @@ template <> struct hb_int_max : hb_integral_constant::value + +template +struct _hb_is_destructible : hb_false_type {}; +template +struct _hb_is_destructible> : hb_true_type {}; +template +using hb_is_destructible = _hb_is_destructible; +#define hb_is_destructible(T) hb_is_destructible::value + template struct _hb_is_constructible : hb_false_type {}; template @@ -335,6 +344,11 @@ using hb_is_move_assignable = hb_is_assignable, template union hb_trivial { T value; }; /* Don't know how to do the following. */ +//template +//using hb_is_trivially_destructible= hb_is_destructible>; +//#define hb_is_trivially_destructible(T) hb_is_trivially_destructible::value + +/* Don't know how to do the following. */ //template //using hb_is_trivially_constructible= hb_is_constructible, hb_trivial...>; //#define hb_is_trivially_constructible(...) hb_is_trivially_constructible<__VA_ARGS__>::value -- 2.7.4