@@ -215,59 +215,11 @@ extern "C" int hb_memalign_impl(void **memptr, size_t alignment, size_t size);
215215 * Compiler attributes
216216 */
217217
218- /* https://github.com/harfbuzz/harfbuzz/issues/1634 */
219- #if __cplusplus < 201103L && !defined(_MSC_VER)
220-
221- #ifndef nullptr
222- #define nullptr NULL
223- #endif
224-
225- #ifndef constexpr
226- #define constexpr const
227- #endif
228-
229- #ifndef static_assert
230- #define static_assert (e, msg ) \
231- HB_UNUSED typedef int HB_PASTE (static_assertion_failed_at_line_, __LINE__) [(e) ? 1 : -1]
232- #endif // static_assert
233-
234- #if defined(__GNUC__)
235- #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8))
236- #define thread_local __thread
237- #endif
238- #else
239- #define thread_local
240- #endif
241-
242- template <typename T>
243- struct _hb_alignof
244- {
245- struct s
246- {
247- char c;
248- T t;
249- };
250- static constexpr size_t value = offsetof (s, t);
251- };
252- #ifndef alignof
253- #define alignof (x ) (_hb_alignof<x>::value)
254- #endif
255-
256- /* https://github.com/harfbuzz/harfbuzz/issues/1127 */
257- #ifndef explicit_operator
258- #define explicit_operator operator
259- #endif
260-
261- #else /* __cplusplus >= 201103L */
262-
263218/* https://github.com/harfbuzz/harfbuzz/issues/1127 */
264219#ifndef explicit_operator
265220#define explicit_operator explicit operator
266221#endif
267222
268- #endif /* __cplusplus < 201103L */
269-
270-
271223#if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE__)
272224#define likely (expr ) (__builtin_expect (!!(expr), 1 ))
273225#define unlikely (expr ) (__builtin_expect (!!(expr), 0 ))
@@ -461,46 +413,13 @@ static_assert ((sizeof (hb_position_t) == 4), "");
461413static_assert ((sizeof (hb_mask_t ) == 4), "");
462414static_assert ((sizeof (hb_var_int_t ) == 4), "");
463415
464-
465- #if __cplusplus >= 201103L
466-
467- /* We only enable these with C++11 or later, since earlier language
468- * does not allow structs with constructors in unions, and we need
469- * those. */
470-
471- #define HB_NO_COPY_ASSIGN (TypeName ) \
472- TypeName (const TypeName&); \
473- void operator =(const TypeName&)
474- #define HB_NO_COPY_ASSIGN_TEMPLATE (TypeName, T ) \
475- TypeName (const TypeName<T>&); \
476- void operator =(const TypeName<T>&)
477- #define HB_NO_COPY_ASSIGN_TEMPLATE2 (TypeName, T1, T2 ) \
478- TypeName (const TypeName<T1, T2>&); \
479- void operator =(const TypeName<T1, T2>&)
480- #define HB_NO_CREATE_COPY_ASSIGN (TypeName ) \
481- TypeName (); \
482- TypeName (const TypeName&); \
483- void operator =(const TypeName&)
484- #define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE (TypeName, T ) \
485- TypeName (); \
486- TypeName (const TypeName<T>&); \
487- void operator =(const TypeName<T>&)
488- #define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2 (TypeName, T1, T2 ) \
489- TypeName (); \
490- TypeName (const TypeName<T1, T2>&); \
491- void operator =(const TypeName<T1, T2>&)
492-
493- #else /* __cpluspplus >= 201103L */
494-
495416#define HB_NO_COPY_ASSIGN (TypeName ) static_assert (true , " " )
496417#define HB_NO_COPY_ASSIGN_TEMPLATE (TypeName, T ) static_assert (true , " " )
497418#define HB_NO_COPY_ASSIGN_TEMPLATE2 (TypeName, T1, T2 ) static_assert (true , " " )
498419#define HB_NO_CREATE_COPY_ASSIGN (TypeName ) static_assert (true , " " )
499420#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE (TypeName, T ) static_assert (true , " " )
500421#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2 (TypeName, T1, T2 ) static_assert (true , " " )
501422
502- #endif /* __cpluspplus >= 201103L */
503-
504423
505424/*
506425 * Compiler-assisted vectorization parameters.
0 commit comments