IsUpper.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISUPPER_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISUPPER_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
45 #include <blaze/util/FalseType.h>
46 #include <blaze/util/mpl/If.h>
47 #include <blaze/util/mpl/Or.h>
48 #include <blaze/util/TrueType.h>
49 
50 
51 namespace blaze {
52 
53 //=================================================================================================
54 //
55 // CLASS DEFINITION
56 //
57 //=================================================================================================
58 
59 //*************************************************************************************************
89 template< typename T >
90 struct IsUpper : public If< Or< IsUniUpper<T>, IsStrictlyUpper<T> >, TrueType, FalseType >::Type
91 {
92  public:
93  //**********************************************************************************************
96  typedef typename If< Or< IsUniUpper<T>, IsStrictlyUpper<T> >, TrueType, FalseType >::Type Type;
98  //**********************************************************************************************
99 };
100 //*************************************************************************************************
101 
102 
103 //*************************************************************************************************
108 template< typename T >
109 struct IsUpper< const T > : public IsUpper<T>::Type
110 {
111  public:
112  //**********************************************************************************************
113  enum { value = IsUpper<T>::value };
114  typedef typename IsUpper<T>::Type Type;
115  //**********************************************************************************************
116 };
118 //*************************************************************************************************
119 
120 
121 //*************************************************************************************************
126 template< typename T >
127 struct IsUpper< volatile T > : public IsUpper<T>::Type
128 {
129  public:
130  //**********************************************************************************************
131  enum { value = IsUpper<T>::value };
132  typedef typename IsUpper<T>::Type Type;
133  //**********************************************************************************************
134 };
136 //*************************************************************************************************
137 
138 
139 //*************************************************************************************************
144 template< typename T >
145 struct IsUpper< const volatile T > : public IsUpper<T>::Type
146 {
147  public:
148  //**********************************************************************************************
149  enum { value = IsUpper<T>::value };
150  typedef typename IsUpper<T>::Type Type;
151  //**********************************************************************************************
152 };
154 //*************************************************************************************************
155 
156 } // namespace blaze
157 
158 #endif
Header file for the IsUniUpper type trait.
Compile time type selection.The If class template selects one of the two given types T2 and T3 depend...
Definition: If.h:112
Header file for the FalseType type/value trait base class.
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:90
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:85
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Header file for the Or class template.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
boost::false_type FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
boost::true_type TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Header file for the TrueType type/value trait base class.