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 */ /*