All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsSigned.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_TYPETRAITS_ISSIGNED_H_
23 #define _BLAZE_UTIL_TYPETRAITS_ISSIGNED_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <boost/type_traits/is_signed.hpp>
31 #include <blaze/util/FalseType.h>
32 #include <blaze/util/SelectType.h>
33 #include <blaze/util/TrueType.h>
34 
35 
36 namespace blaze {
37 
38 //=================================================================================================
39 //
40 // CLASS DEFINITION
41 //
42 //=================================================================================================
43 
44 //*************************************************************************************************
49 template< typename T >
50 struct IsSignedHelper
51 {
52  //**********************************************************************************************
53  enum { value = boost::is_signed<T>::value };
54  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
55  //**********************************************************************************************
56 };
58 //*************************************************************************************************
59 
60 
61 //*************************************************************************************************
82 template< typename T >
83 struct IsSigned : public IsSignedHelper<T>::Type
84 {
85  public:
86  //**********************************************************************************************
88  enum { value = IsSignedHelper<T>::value };
89  typedef typename IsSignedHelper<T>::Type Type;
91  //**********************************************************************************************
92 };
93 //*************************************************************************************************
94 
95 } // namespace blaze
96 
97 #endif