From ff68be31bf2ea82bf6bfcc6f993fb6806a895f97 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 16 Apr 2019 09:59:08 -0400 Subject: [PATCH] Add hb_void_tt<> ala std::void_t --- src/hb-meta.hh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hb-meta.hh b/src/hb-meta.hh index a71121991..d2733d716 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -90,6 +90,13 @@ static T&& hb_forward (hb_remove_reference (T)&& t) { return (T&&) t; } /* Void! For when we need a expression-type of void. */ struct hb_void_t { typedef void value; }; +/* Void meta-function ala std::void_t + * https://en.cppreference.com/w/cpp/types/void_t */ +template +struct _hb_make_void { typedef void type; }; +template +using hb_void_tt = typename _hb_make_void::type; + /* Bool! For when we need to evaluate type-dependent expressions * in a template argument. */ template struct hb_bool_tt { enum { value = b }; };