summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-meta.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-meta.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-meta.hh15
1 files changed, 15 insertions, 0 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-meta.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-meta.hh
index 4c0898b1b75..e40d9fd178c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-meta.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-meta.hh
@@ -49,6 +49,10 @@ template <bool b> using hb_bool_constant = hb_integral_constant<bool, b>;
using hb_true_type = hb_bool_constant<true>;
using hb_false_type = hb_bool_constant<false>;
+/* Static-assert as expression. */
+template <bool cond> struct static_assert_expr;
+template <> struct static_assert_expr<true> : hb_false_type {};
+#define static_assert_expr(C) static_assert_expr<C>::value
/* Basic type SFINAE. */
@@ -220,6 +224,8 @@ struct hb_reference_wrapper<T&>
};
+/* Type traits */
+
template <typename T>
using hb_is_integral = hb_bool_constant<
hb_is_same (hb_decay<T>, char) ||
@@ -292,6 +298,15 @@ template <> struct hb_int_max<unsigned long long> : hb_integral_constant<unsigne
#define hb_int_max(T) hb_int_max<T>::value
+/* Class traits. */
+
+#define HB_DELETE_COPY_ASSIGN(TypeName) \
+ TypeName(const TypeName&) = delete; \
+ void operator=(const TypeName&) = delete
+#define HB_DELETE_CREATE_COPY_ASSIGN(TypeName) \
+ TypeName() = delete; \
+ TypeName(const TypeName&) = delete; \
+ void operator=(const TypeName&) = delete
template <typename T, typename>
struct _hb_is_destructible : hb_false_type {};