diff --git a/src/hb.hh b/src/hb.hh index d7fef1246..9043de403 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -215,59 +215,6 @@ extern "C" int hb_memalign_impl(void **memptr, size_t alignment, size_t size); * Compiler attributes */ -/* https://github.com/harfbuzz/harfbuzz/issues/1634 */ -#if __cplusplus < 201103L && !defined(_MSC_VER) - -#ifndef nullptr -#define nullptr NULL -#endif - -#ifndef constexpr -#define constexpr const -#endif - -#ifndef static_assert -#define static_assert(e, msg) \ - HB_UNUSED typedef int HB_PASTE(static_assertion_failed_at_line_, __LINE__) [(e) ? 1 : -1] -#endif // static_assert - -#if defined(__GNUC__) -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)) -#define thread_local __thread -#endif -#else -#define thread_local -#endif - -template -struct _hb_alignof -{ - struct s - { - char c; - T t; - }; - static constexpr size_t value = offsetof (s, t); -}; -#ifndef alignof -#define alignof(x) (_hb_alignof::value) -#endif - -/* https://github.com/harfbuzz/harfbuzz/issues/1127 */ -#ifndef explicit_operator -#define explicit_operator operator -#endif - -#else /* __cplusplus >= 201103L */ - -/* https://github.com/harfbuzz/harfbuzz/issues/1127 */ -#ifndef explicit_operator -#define explicit_operator explicit operator -#endif - -#endif /* __cplusplus < 201103L */ - - #if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE__) #define likely(expr) (__builtin_expect (!!(expr), 1)) #define unlikely(expr) (__builtin_expect (!!(expr), 0))