Blaze  3.6
Or.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_MPL_OR_H_
36 #define _BLAZE_UTIL_MPL_OR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/util/mpl/Bools.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
73 template< typename T1 // Type of the first mandatory operand
74  , typename T2 // Type of the second mandatory operand
75  , typename... Ts > // Types of the optional operands
76 using Or_t =
77  Bool_t< !IsSame< Bools< false, T1::value, T2::value, (Ts::value)... >
78  , Bools< T1::value, T2::value, (Ts::value)..., false > >::value >;
79 //*************************************************************************************************
80 
81 
82 //*************************************************************************************************
95 template< typename T1 // Type of the first mandatory operand
96  , typename T2 // Type of the second mandatory operand
97  , typename... Ts > // Types of the optional operands
98 constexpr bool Or_v = Or_t<T1,T2,Ts...>::value;
99 //*************************************************************************************************
100 
101 } // namespace blaze
102 
103 #endif
Bool_t< !IsSame< Bools< false, T1::value, T2::value,(Ts::value)... >, Bools< T1::value, T2::value,(Ts::value)..., false > >::value > Or_t
Compile time logical OR evaluation.The Or_t alias template performs at compile time a logical OR ('||...
Definition: Or.h:78
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
Header file for the IsSame and IsStrictlySame type traits.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
IntegralConstant< bool, B > Bool_t
Compile time integral constant wrapper for bool.The Bool_t alias template represents an integral wrap...
Definition: IntegralConstant.h:153
constexpr bool Or_v
Auxiliary variable template for the Or_t alias.The Or_v variable template provides a convenient short...
Definition: Or.h:98
Header file for the IntegralConstant class template.
Auxiliary tool for unwrapping a pack of variadic boolean values.The Bools class template represents a...
Definition: Bools.h:55
Header file for the Bools class template.