提交 3686c3b6 编写于 作者: B Behdad Esfahbod

Adjust is_cr_convertible

If To is const& then From doesn't need to be &.
上级 726002a6
...@@ -116,10 +116,16 @@ template <typename T> using hb_remove_pointer = typename hb_match_pointer<T>::ty ...@@ -116,10 +116,16 @@ template <typename T> using hb_remove_pointer = typename hb_match_pointer<T>::ty
/* TODO Add feature-parity to std::decay. */ /* TODO Add feature-parity to std::decay. */
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(From, To) ( \ #define hb_is_cr_convertible(From, To) \
hb_is_same (hb_decay<From>, hb_decay<To>) && \ ( \
hb_is_const (From) <= hb_is_const (To) && \ hb_is_same (hb_decay<From>, hb_decay<To>) && \
hb_is_reference (From) >= hb_is_reference (To)) ( \
hb_is_const (From) <= hb_is_const (To) && \
hb_is_reference (From) >= hb_is_reference (To) \
) || ( \
hb_is_const (To) && hb_is_reference (To) \
) \
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册