From c7c5df9ffd4f7bcc84a9a02a565ccc1807cca529 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 29 Oct 2018 15:16:52 -0700 Subject: [PATCH] Try fixing older bots Older C++ doesn't allow struct-with-constructor in union. --- src/hb.hh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/hb.hh b/src/hb.hh index 18bccdbc2..8198d396b 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -337,6 +337,8 @@ static_assert ((sizeof (hb_mask_t) == 4), ""); static_assert ((sizeof (hb_var_int_t) == 4), ""); +#if __cplusplus >= 201103L + #define HB_DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) @@ -344,8 +346,17 @@ static_assert ((sizeof (hb_var_int_t) == 4), ""); TypeName(const TypeName&); \ void operator=(const TypeName&) #define HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE2(TypeName, T1, T2) \ + inline TypeName() {} \ TypeName(const TypeName&); \ - void operator=(const TypeName&) + void operator=(const TypeName&); + +#else /* __cpluspplus >= 201103L */ + +#define HB_DISALLOW_COPY_AND_ASSIGN(TypeName) +#define HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE(TypeName, T) +#define HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE2(TypeName, T1, T2) + +#endif /* __cpluspplus >= 201103L */ /*