[meta] Move code around
This commit is contained in:
parent
aa2ab4f061
commit
f64ea8fc65
|
@ -33,6 +33,7 @@
|
|||
#define HB_ATOMIC_HH
|
||||
|
||||
#include "hb.hh"
|
||||
#include "hb-meta.hh"
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -37,6 +37,16 @@
|
|||
|
||||
template <typename T> static inline T hb_declval ();
|
||||
|
||||
template <typename T> struct hb_remove_const { typedef T value; };
|
||||
template <typename T> struct hb_remove_const<const T> { typedef T value; };
|
||||
#define hb_remove_const(T) hb_remove_const<T>::value
|
||||
template <typename T> struct hb_remove_reference { typedef T value; };
|
||||
template <typename T> struct hb_remove_reference<T &> { typedef T value; };
|
||||
#define hb_remove_reference(T) hb_remove_reference<T>::value
|
||||
template <typename T> struct hb_remove_pointer { typedef T value; };
|
||||
template <typename T> struct hb_remove_pointer<T *> { typedef T value; };
|
||||
#define hb_remove_pointer(T) hb_remove_pointer<T>::value
|
||||
|
||||
|
||||
/* Void! For when we need a expression-type of void. */
|
||||
struct hb_void_t { typedef void value; };
|
||||
|
|
14
src/hb.hh
14
src/hb.hh
|
@ -612,24 +612,12 @@ _hb_memalign(void **memptr, size_t alignment, size_t size)
|
|||
#define HB_SCRIPT_MYANMAR_ZAWGYI ((hb_script_t) HB_TAG ('Q','a','a','g'))
|
||||
|
||||
|
||||
/* Some really basic things everyone wants. */
|
||||
template <typename T> struct hb_remove_const { typedef T value; };
|
||||
template <typename T> struct hb_remove_const<const T> { typedef T value; };
|
||||
#define hb_remove_const(T) hb_remove_const<T>::value
|
||||
template <typename T> struct hb_remove_reference { typedef T value; };
|
||||
template <typename T> struct hb_remove_reference<T &> { typedef T value; };
|
||||
#define hb_remove_reference(T) hb_remove_reference<T>::value
|
||||
template <typename T> struct hb_remove_pointer { typedef T value; };
|
||||
template <typename T> struct hb_remove_pointer<T *> { typedef T value; };
|
||||
#define hb_remove_pointer(T) hb_remove_pointer<T>::value
|
||||
|
||||
|
||||
/* Headers we include for everyone. Keep topologically sorted by dependency.
|
||||
* They express dependency amongst themselves, but no other file should include
|
||||
* them directly.*/
|
||||
#include "hb-atomic.hh"
|
||||
#include "hb-meta.hh"
|
||||
#include "hb-mutex.hh"
|
||||
#include "hb-atomic.hh" // Requires: hb-meta
|
||||
#include "hb-null.hh" // Requires: hb-meta
|
||||
#include "hb-dsalgs.hh" // Requires: hb-null
|
||||
#include "hb-iter.hh" // Requires: hb-dsalgs hb-meta hb-null
|
||||
|
|
Loading…
Reference in New Issue