summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hb-null.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hb-null.hh b/src/hb-null.hh
index 51f653d2..8b36c05c 100644
--- a/src/hb-null.hh
+++ b/src/hb-null.hh
@@ -41,9 +41,14 @@
extern HB_INTERNAL
hb_vector_size_impl_t const _hb_NullPool[(HB_NULL_POOL_SIZE + sizeof (hb_vector_size_impl_t) - 1) / sizeof (hb_vector_size_impl_t)];
+#if __cplusplus < 201103L
+#define decltype typeof
+#endif
+
/* Generic nul-content Null objects. */
template <typename Type>
static inline Type const & Null (void) {
+ HB_UNUSED decltype (0) _i;
static_assert (sizeof (Type) <= HB_NULL_POOL_SIZE, "Increase HB_NULL_POOL_SIZE.");
return *reinterpret_cast<Type const *> (_hb_NullPool);
}