All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
And.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_MPL_AND_H_
36 #define _BLAZE_UTIL_MPL_AND_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/NullType.h>
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
71 template< typename T1 // Type of the first operand
72  , typename T2 // Type of the second operand
73  , typename T3 = NullType // Type of the third operand
74  , typename T4 = NullType // Type of the fourth operand
75  , typename T5 = NullType > // Type of the fifth operand
76 struct And
77 {
78  public:
79  //**********************************************************************************************
81  enum { value = T1::value && T2::value && T3::value && T4::value && T5::value };
83  //**********************************************************************************************
84 };
85 //*************************************************************************************************
86 
87 
88 //*************************************************************************************************
90 template< typename T1 // Type of the first operand
92  , typename T2 > // Type of the second operand
93 struct And<T1,T2,NullType,NullType,NullType>
94 {
95  public:
96  //**********************************************************************************************
97  enum { value = T1::value && T2::value };
98  //**********************************************************************************************
99 };
101 //*************************************************************************************************
102 
103 
104 //*************************************************************************************************
106 template< typename T1 // Type of the first operand
108  , typename T2 // Type of the second operand
109  , typename T3 > // Type of the third operand
110 struct And<T1,T2,T3,NullType,NullType>
111 {
112  public:
113  //**********************************************************************************************
114  enum { value = T1::value && T2::value && T3::value };
115  //**********************************************************************************************
116 };
118 //*************************************************************************************************
119 
120 
121 //*************************************************************************************************
123 template< typename T1 // Type of the first operand
125  , typename T2 // Type of the second operand
126  , typename T3 // Type of the third operand
127  , typename T4 > // Type of the fourth operand
128 struct And<T1,T2,T3,T4,NullType>
129 {
130  public:
131  //**********************************************************************************************
132  enum { value = T1::value && T2::value && T3::value && T4::value };
133  //**********************************************************************************************
134 };
136 //*************************************************************************************************
137 
138 } // namespace blaze
139 
140 #endif
Utility type for generic codes.
Utility type for generic codes.The NullType class represents an invalid or terminating data type for ...
Definition: NullType.h:54
Compile time logical and evaluation.The And class template performs at compile time a logical and (&#39;&amp;...
Definition: And.h:76