All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsIntegral.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPETRAITS_ISINTEGRAL_H_
36 #define _BLAZE_UTIL_TYPETRAITS_ISINTEGRAL_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <boost/type_traits/is_integral.hpp>
44 #include <blaze/util/FalseType.h>
45 #include <blaze/util/SelectType.h>
46 #include <blaze/util/TrueType.h>
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
62 template< typename T >
63 struct IsIntegralHelper
64 {
65  //**********************************************************************************************
66  enum { value = boost::is_integral<T>::value };
67  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
68  //**********************************************************************************************
69 };
71 //*************************************************************************************************
72 
73 
74 //*************************************************************************************************
93 template< typename T >
94 struct IsIntegral : public IsIntegralHelper<T>::Type
95 {
96  public:
97  //**********************************************************************************************
99  enum { value = IsIntegralHelper<T>::value };
100  typedef typename IsIntegralHelper<T>::Type Type;
102  //**********************************************************************************************
103 };
104 //*************************************************************************************************
105 
106 } // namespace blaze
107 
108 #endif
Header file for the FalseType type/value trait base class.
Header file for the SelectType class template.
Compile time check for integral data types.This type trait tests whether or not the given template pa...
Definition: IsIntegral.h:94
Header file for the TrueType type/value trait base class.