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/mpl/Bool.h>
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
59 template< typename T // Type of the mandatory argument
60  , typename... Ts > // Types of the optional operands
61 struct AndHelper
62  : public Bool< T::value && AndHelper<Ts...>::value >
63 {};
65 //*************************************************************************************************
66 
67 
68 //*************************************************************************************************
73 template< typename T > // Type of the mandatory argument
74 struct AndHelper<T>
75  : public Bool< T::value >
76 {};
78 //*************************************************************************************************
79 
80 
81 //*************************************************************************************************
98 template< typename T1 // Type of the first mandatory operand
99  , typename T2 // Type of the second mandatory operand
100  , typename... Ts > // Types of the optional operands
101 struct And
102  : public Bool< AndHelper<T1,T2,Ts...>::value >
103 {};
104 //*************************************************************************************************
105 
106 } // namespace blaze
107 
108 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time integral constant wrapper for bool.The Bool class template represents an integral wrappe...
Definition: Bool.h:70
Compile time logical and evaluation.The And class template performs at compile time a logical and ('&&...
Definition: And.h:101
Header file for the Bool class template.