OSDN Git Service

type_traits/is.hpp: is_signed, is_unsigned Add.
authorMyun2 <myun2@nwhite.info>
Thu, 24 May 2012 16:42:13 +0000 (01:42 +0900)
committerMyun2 <myun2@nwhite.info>
Thu, 24 May 2012 16:42:13 +0000 (01:42 +0900)
roast/include/roast/type_traits/is.hpp

index dec216d..915d16c 100644 (file)
@@ -49,6 +49,26 @@ namespace roast
                //////////////////////////////////////
 
                template <typename T>
+               struct is_signed :
+                       ttis_or<
+                               ttis_or<is_xchar<T>,is_xint<T> >,
+                               ttis_or<is_xshort<T>,is_xlong<T> >
+                       >
+               {};
+               
+               //////////////////////////////////////
+
+               template <typename T>
+               struct is_unsigned :
+                       ttis_or<
+                               ttis_or<is_xuchar<T>,is_xuint<T> >,
+                               ttis_or<is_xushort<T>,is_xulong<T> >
+                       >
+               {};
+               
+               //////////////////////////////////////
+
+               template <typename T>
                struct is_real_number :
                        ttis_or<is_xfloat<T>,is_xdouble<T> >
                {};