35 #ifndef EASTL_INTERNAL_TYPE_POD_H 36 #define EASTL_INTERNAL_TYPE_POD_H 72 struct is_empty_helper_t1 :
public T {
char m[64]; };
73 struct is_empty_helper_t2 {
char m[64]; };
76 template <
typename T,
bool is_a_
class = false>
77 struct is_empty_helper :
public false_type{};
80 struct is_empty_helper<T, true> :
public integral_constant<bool,
81 sizeof(is_empty_helper_t1<T>) == sizeof(is_empty_helper_t2)
85 struct is_empty_helper2
87 typedef typename remove_cv<T>::type _T;
88 typedef is_empty_helper<_T, is_class<_T>::value> type;
92 struct is_empty :
public is_empty_helper2<T>::type {};
116 template <
typename T>
117 struct is_pod :
public integral_constant<bool, is_void<T>::value || is_scalar<T>::value>{};
119 template <
typename T,
size_t N>
120 struct is_pod<T[N]> :
public is_pod<T>{};
122 template <
typename T>
123 struct is_POD :
public is_pod<T>{};
125 #define EASTL_DECLARE_POD(T) namespace eastl{ template <> struct is_pod<T> : public true_type{}; template <> struct is_pod<const T> : public true_type{}; } 155 template <
typename T>
156 struct has_trivial_constructor :
public is_pod<T> {};
158 #define EASTL_DECLARE_TRIVIAL_CONSTRUCTOR(T) namespace eastl{ template <> struct has_trivial_constructor<T> : public true_type{}; template <> struct has_trivial_constructor<const T> : public true_type{}; } 194 template <
typename T>
195 struct has_trivial_copy :
public integral_constant<bool, is_pod<T>::value && !is_volatile<T>::value>{};
197 #define EASTL_DECLARE_TRIVIAL_COPY(T) namespace eastl{ template <> struct has_trivial_copy<T> : public true_type{}; template <> struct has_trivial_copy<const T> : public true_type{}; } 222 template <
typename T>
223 struct has_trivial_assign :
public integral_constant<bool,
224 is_pod<T>::value && !is_const<T>::value && !is_volatile<T>::value
227 #define EASTL_DECLARE_TRIVIAL_ASSIGN(T) namespace eastl{ template <> struct has_trivial_assign<T> : public true_type{}; template <> struct has_trivial_assign<const T> : public true_type{}; } 252 template <
typename T>
253 struct has_trivial_destructor :
public is_pod<T>{};
255 #define EASTL_DECLARE_TRIVIAL_DESTRUCTOR(T) namespace eastl{ template <> struct has_trivial_destructor<T> : public true_type{}; template <> struct has_trivial_destructor<const T> : public true_type{}; } 275 template <
typename T>
276 struct has_trivial_relocate :
public integral_constant<bool, is_pod<T>::value && !is_volatile<T>::value>{};
278 #define EASTL_DECLARE_TRIVIAL_RELOCATE(T) namespace eastl{ template <> struct has_trivial_relocate<T> : public true_type{}; template <> struct has_trivial_relocate<const T> : public true_type{}; } 284 #endif // Header include guard EA Standard Template Library.