[meta] Add hb_declval() macro
This commit is contained in:
parent
adc5910a63
commit
a6c013b1bf
@ -173,7 +173,7 @@ struct _hb_is_iterator
|
||||
};
|
||||
template<typename Iter, typename Item>
|
||||
struct hb_is_iterator { enum {
|
||||
value = sizeof (int) == sizeof (hb_declval<_hb_is_iterator<Iter> > () (hb_declval<Iter*> ())) }; };
|
||||
value = sizeof (int) == sizeof (hb_declval (_hb_is_iterator<Iter>) (hb_declval (Iter*))) }; };
|
||||
#define hb_is_iterator(Iter, Item) hb_is_iterator<Iter, Item>::value
|
||||
|
||||
#define hb_is_sorted_iterator(Iter, Item) \
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
|
||||
template <typename T> static inline T hb_declval ();
|
||||
#define hb_declval(T) (hb_declval<T> ())
|
||||
|
||||
template <typename T> struct hb_match_const { typedef T type; enum { value = false }; };
|
||||
template <typename T> struct hb_match_const<const T> { typedef T type; enum { value = true }; };
|
||||
|
Loading…
x
Reference in New Issue
Block a user