[iter] Use hb_declval() instead of Null() to get instance

I had used Null to make one of the bots happy before.  Not going
to bend to such demands anymore..
This commit is contained in:
Behdad Esfahbod 2019-01-26 22:47:35 +01:00
parent 6b6783e158
commit 509353357c
2 changed files with 2 additions and 3 deletions

View File

@ -30,7 +30,6 @@
#include "hb.hh"
#include "hb-algs.hh" // for hb_addressof
#include "hb-meta.hh"
#include "hb-null.hh"
/* Unified iterator object.
@ -155,7 +154,7 @@ template<typename T, typename B>
struct _hb_is_iterable
{ enum { value = false }; };
template<typename T>
struct _hb_is_iterable<T, hb_bool_tt<true || sizeof (Null(T).iter ())> >
struct _hb_is_iterable<T, hb_bool_tt<true || sizeof (hb_declval (T).iter ())> >
{ enum { value = true }; };
template<typename T>

View File

@ -635,7 +635,7 @@ _hb_memalign(void **memptr, size_t alignment, size_t size)
#include "hb-atomic.hh" // Requires: hb-meta
#include "hb-null.hh" // Requires: hb-meta
#include "hb-algs.hh" // Requires: hb-null
#include "hb-iter.hh" // Requires: hb-algs hb-meta hb-null
#include "hb-iter.hh" // Requires: hb-algs hb-meta
#include "hb-debug.hh" // Requires: hb-algs hb-atomic
#include "hb-array.hh" // Requires: hb-algs hb-iter hb-null
#include "hb-vector.hh" // Requires: hb-array hb-null