提交 f9a3eab8 编写于 作者: B Behdad Esfahbod
上级 470acb6c
......@@ -72,7 +72,7 @@ struct Iter<T *>
array (array_), length (length_) {}
/* Emptiness. */
inline operator bool (void) const { return bool (length); }
explicit_operator inline operator bool (void) const { return bool (length); }
/* Current item. */
inline T &operator * (void)
......
......@@ -125,7 +125,20 @@ struct _hb_alignof
#define alignof(x) (_hb_alignof<x>::value)
#endif
#endif // __cplusplus < 201103L
/* https://github.com/harfbuzz/harfbuzz/issues/1127 */
#ifndef explicit_operator
#define explicit_operator
#endif
#else /* __cplusplus >= 201103L */
/* https://github.com/harfbuzz/harfbuzz/issues/1127 */
#ifndef explicit_operator
#define explicit_operator explicit
#endif
#endif /* __cplusplus < 201103L */
#if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE__)
#define likely(expr) (__builtin_expect (!!(expr), 1))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册