[set/map/vector] Make constructable, but not copy or assignable
Disable copy/assign on them, as they shouldn't.
Make constructor / destructor call init_shallow/fini_shallow,
and make those idempotent. So, these three can be constructed
on stack now and no init/fini call is needed. As such,
hb_auto_t<> is not needed anymore. I'll remove that separately.
diff --git a/src/hb.hh b/src/hb.hh
index 74dd8ac..6f5d6aa 100644
--- a/src/hb.hh
+++ b/src/hb.hh
@@ -339,6 +339,16 @@
#if __cplusplus >= 201103L
+/* We only enable these with C++11 or later, since earlier language
+ * does not allow structs with constructors in unions, and we need
+ * those. */
+
+#define HB_NO_COPY_ASSIGN(TypeName) \
+ TypeName(const TypeName&); \
+ void operator=(const TypeName&)
+#define HB_NO_COPY_ASSIGN_TEMPLATE2(TypeName, T1, T2) \
+ TypeName(const TypeName<T1, T2>&); \
+ void operator=(const TypeName<T1, T2>&)
#define HB_NO_CREATE_COPY_ASSIGN(TypeName) \
TypeName(void); \
TypeName(const TypeName&); \
@@ -354,6 +364,8 @@
#else /* __cpluspplus >= 201103L */
+#define HB_NO_COPY_ASSIGN(TypeName)
+#define HB_NO_COPY_ASSIGN_TEMPLATE2(TypeName, T1, T2)
#define HB_NO_CREATE_COPY_ASSIGN(TypeName)
#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE(TypeName, T)
#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2(TypeName, T1, T2)