From 8ecae793aa79056a312d3c8518106cfeca42390e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 26 Apr 2019 12:57:56 -0700 Subject: [PATCH] [meta] Add hb_is_cr_convertible_to() --- src/hb-meta.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hb-meta.hh b/src/hb-meta.hh index 73f965f86..005420364 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -98,6 +98,11 @@ template using hb_remove_pointer = typename hb_match_pointer::ty template using hb_decay = hb_remove_const>; +#define hb_is_cr_convertible_to(A, B) ( \ + hb_is_same (hb_decay, hb_decay) && \ + hb_is_const (A) <= hb_is_const (B) && \ + hb_is_reference (A) >= hb_is_reference (B)) + /* std::move and std::forward */