[meta] Add hb_is_cr_convertible_to()

This commit is contained in:
Behdad Esfahbod 2019-04-26 12:57:56 -07:00
parent 52bb0346d3
commit 8ecae793aa

View File

@ -98,6 +98,11 @@ template <typename T> using hb_remove_pointer = typename hb_match_pointer<T>::ty
template <typename T> using hb_decay = hb_remove_const<hb_remove_reference<T>>; template <typename T> using hb_decay = hb_remove_const<hb_remove_reference<T>>;
#define hb_is_cr_convertible_to(A, B) ( \
hb_is_same (hb_decay<A>, hb_decay<B>) && \
hb_is_const (A) <= hb_is_const (B) && \
hb_is_reference (A) >= hb_is_reference (B))
/* std::move and std::forward */ /* std::move and std::forward */