Blaze  3.6
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 
46 #include <blaze/util/EnableIf.h>
49 
50 
51 namespace blaze {
52 
53 //=================================================================================================
54 //
55 // CLASS DEFINITION
56 //
57 //=================================================================================================
58 
59 //*************************************************************************************************
61 template< typename T > struct IsUpper;
63 //*************************************************************************************************
64 
65 
66 //*************************************************************************************************
71 template< typename T
72  , typename = void >
73 struct IsUpperHelper
74  : public BoolConstant< IsUniUpper_v<T> || IsStrictlyUpper_v<T> >
75 {};
76 
77 template< typename T > // Type of the operand
78 struct IsUpperHelper< T, EnableIf_t< IsExpression_v<T> && !IsSame_v<T,typename T::ResultType> > >
79  : public IsUpper< typename T::ResultType >::Type
80 {};
82 //*************************************************************************************************
83 
84 
85 //*************************************************************************************************
115 template< typename T >
116 struct IsUpper
117  : public IsUpperHelper<T>
118 {};
119 //*************************************************************************************************
120 
121 
122 //*************************************************************************************************
127 template< typename T >
128 struct IsUpper< const T >
129  : public IsUpper<T>
130 {};
132 //*************************************************************************************************
133 
134 
135 //*************************************************************************************************
140 template< typename T >
141 struct IsUpper< volatile T >
142  : public IsUpper<T>
143 {};
145 //*************************************************************************************************
146 
147 
148 //*************************************************************************************************
153 template< typename T >
154 struct IsUpper< const volatile T >
155  : public IsUpper<T>
156 {};
158 //*************************************************************************************************
159 
160 
161 //*************************************************************************************************
174 template< typename T >
175 constexpr bool IsUpper_v = IsUpper<T>::value;
176 //*************************************************************************************************
177 
178 } // namespace blaze
179 
180 #endif
Header file for the IsUniUpper type trait.
Header file for the IsSame and IsStrictlySame type traits.
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:116
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr bool IsExpression_v
Auxiliary variable template for the IsExpression type trait.The IsExpression_v variable template prov...
Definition: IsExpression.h:130
Header file for the EnableIf class template.
constexpr bool IsUpper_v
Auxiliary variable template for the IsUpper type trait.The IsUpper_v variable template provides a con...
Definition: IsUpper.h:175
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant alias template represents ...
Definition: IntegralConstant.h:110
Header file for the IntegralConstant class template.
Header file for the IsExpression type trait class.