From: Behdad Esfahbod Date: Wed, 3 Apr 2019 21:15:01 +0000 (-0700) Subject: [meta] Add hb_is_same() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2778df7972f537192b51cd0719adf2ab4d1f3397;p=platform%2Fupstream%2FlibHarfBuzzSharp.git [meta] Add hb_is_same() --- diff --git a/src/hb-meta.hh b/src/hb-meta.hh index 63c8a8c..c009563 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -92,15 +92,18 @@ template struct hb_bool_tt { enum { value = b }; }; typedef hb_bool_tt hb_true_t; typedef hb_bool_tt hb_false_t; - template struct hb_enable_if {}; - template struct hb_enable_if { typedef T type; }; - #define hb_enable_if(Cond) typename hb_enable_if<(Cond)>::type* = nullptr +template +struct hb_is_same : hb_false_t {}; +template +struct hb_is_same : hb_true_t {}; +#define hb_is_same(T, T2) hb_is_same::value + /* * Meta-functions.