All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsConst.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_TYPETRAITS_ISCONST_H_
23 #define _BLAZE_UTIL_TYPETRAITS_ISCONST_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <boost/type_traits/is_const.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 IsConstHelper
51 {
52  //**********************************************************************************************
53  enum { value = boost::is_const<T>::value };
54  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
55  //**********************************************************************************************
56 };
58 //*************************************************************************************************
59 
60 
61 //*************************************************************************************************
80 template< typename T >
81 struct IsConst : public IsConstHelper<T>::Type
82 {
83  public:
84  //**********************************************************************************************
86  enum { value = IsConstHelper<T>::value };
87  typedef typename IsConstHelper<T>::Type Type;
89  //**********************************************************************************************
90 };
91 //*************************************************************************************************
92 
93 } // namespace blaze
94 
95 #endif