/* Global nul-content Null pool. Enlarge as necessary. */
-#define HB_NULL_POOL_SIZE 1024
+#define HB_NULL_POOL_SIZE 9880
+ /* Use SFINAE to sniff whether T has min_size; in which case return T::null_size,
+ * otherwise return sizeof(T). */
+
+ /* The hard way...
+ * https://stackoverflow.com/questions/7776448/sfinae-tried-with-bool-gives-compiler-error-template-argument-tvalue-invol
+ */
+
+ template<bool> struct _hb_bool_type {};
+
+ template <typename T, typename B>
+ struct _hb_null_size
+ { enum { value = sizeof (T) }; };
+ template <typename T>
+ struct _hb_null_size<T, _hb_bool_type<(bool) (1 + (unsigned int) T::min_size)> >
+ { enum { value = T::null_size }; };
+
+ template <typename T>
+ struct hb_null_size
+ { enum { value = _hb_null_size<T, _hb_bool_type<true> >::value }; };
+ #define hb_null_size(T) hb_null_size<T>::value
+
+ /* This doesn't belong here, but since is copy/paste from above, put it here. */
+
+ template <typename T, typename B>
+ struct _hb_static_size
+ { enum { value = sizeof (T) }; };
+ template <typename T>
+ struct _hb_static_size<T, _hb_bool_type<(bool) (1 + (unsigned int) T::min_size)> >
+ { enum { value = T::static_size }; };
+
+ template <typename T>
+ struct hb_static_size
+ { enum { value = _hb_static_size<T, _hb_bool_type<true> >::value }; };
+ #define hb_static_size(T) hb_static_size<T>::value
+
+
+ /*
+ * Null()
+ */
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)];