00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __SYS_TYPETRAITS_H_INCLUDED__
00019 #define __SYS_TYPETRAITS_H_INCLUDED__
00020
00021 #include "SYS_API.h"
00022 #include <boost/type_traits.hpp>
00023
00024
00025
00026
00027 #define SYS_DECLARE_IS_POD(T) \
00028 namespace boost { \
00029 template<> struct is_pod<T> : public true_type {}; \
00030 } \
00031
00032
00033 template <typename T>
00034 static inline bool SYSisPOD()
00035 {
00036 return boost::is_pod<T>::value;
00037 }
00038
00039 template <typename T1, typename T2>
00040 static inline bool SYSisSame()
00041 {
00042 return boost::is_same<T1, T2>();
00043 }
00044
00045
00046
00047
00048 template <typename T> class SYS_IsPointer
00049 { public: static const bool value = false; };
00050
00051 template <typename U> class SYS_IsPointer<U*>
00052 { public: static const bool value = true; };
00053
00054 template <typename T>
00055 static inline bool SYSisPointer()
00056 {
00057 return SYS_IsPointer<T>::value;
00058 }
00059
00060
00061
00062 #endif // __SYS_TYPETRAITS_H_INCLUDED__