CrossTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_CROSSTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_CROSSTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 #include <blaze/util/EnableIf.h>
47 #include <blaze/util/InvalidType.h>
48 #include <blaze/util/mpl/And.h>
49 #include <blaze/util/mpl/If.h>
50 #include <blaze/util/mpl/Not.h>
51 #include <blaze/util/mpl/Or.h>
56 
57 
58 namespace blaze {
59 
60 //=================================================================================================
61 //
62 // CLASS DEFINITION
63 //
64 //=================================================================================================
65 
66 //*************************************************************************************************
110 template< typename T1 // Type of the left-hand side operand
111  , typename T2 // Type of the right-hand side operand
112  , typename = void > // Restricting condition
114 {
115  private:
116  //**********************************************************************************************
118  struct Failure { using Type = INVALID_TYPE; };
120  //**********************************************************************************************
121 
122  public:
123  //**********************************************************************************************
125  using Type = typename If_< Or< IsConst<T1>, IsVolatile<T1>, IsReference<T1>
128  , Failure >::Type;
130  //**********************************************************************************************
131 };
132 //*************************************************************************************************
133 
134 
135 //*************************************************************************************************
141 template< typename T1, typename T2 >
142 struct CrossTrait< T1, T2
143  , EnableIf_< And< Or< IsCustom<T1>, IsInitializer<T1>, IsView<T1> >
144  , Not< Or< IsCustom<T2>, IsInitializer<T2>, IsView<T2> > > > > >
145 {
146  public:
147  //**********************************************************************************************
149  //**********************************************************************************************
150 };
152 //*************************************************************************************************
153 
154 
155 //*************************************************************************************************
161 template< typename T1, typename T2 >
162 struct CrossTrait< T1, T2
163  , EnableIf_< And< Not< Or< IsCustom<T1>, IsInitializer<T1>, IsView<T1> > >
164  , Or< IsCustom<T2>, IsInitializer<T2>, IsView<T2> > > > >
165 {
166  public:
167  //**********************************************************************************************
169  //**********************************************************************************************
170 };
172 //*************************************************************************************************
173 
174 
175 //*************************************************************************************************
181 template< typename T1, typename T2 >
182 struct CrossTrait< T1, T2
183  , EnableIf_< And< Or< IsCustom<T1>, IsInitializer<T1>, IsView<T1> >
184  , Or< IsCustom<T2>, IsInitializer<T2>, IsView<T2> > > > >
185 {
186  public:
187  //**********************************************************************************************
189  //**********************************************************************************************
190 };
192 //*************************************************************************************************
193 
194 
195 //*************************************************************************************************
208 template< typename T1, typename T2 >
210 //*************************************************************************************************
211 
212 } // namespace blaze
213 
214 #endif
Header file for the IsInitializer type trait.
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:75
typename Decay< T >::Type Decay_
Auxiliary alias declaration for the Decay type trait.The Decay_ alias declaration provides a convenie...
Definition: Decay.h:98
Header file for the And class template.
Header file for the IsVolatile type trait.
Base template for the CrossTrait class.
Definition: CrossTrait.h:113
Header file for the Decay type trait.
Header file for the IsCustom type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Header file for the Or class template.
Header file for the Not class template.
typename CrossTrait< T1, T2 >::Type CrossTrait_
Auxiliary alias declaration for the CrossTrait class template.The CrossTrait_ alias declaration provi...
Definition: CrossTrait.h:209
Header file for the EnableIf class template.
Header file for the IsView type trait.
Header file for the IsConst type trait.
Utility type for generic codes.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:154
Header file for the IsReference type trait.
Compile time check for constant data types.The IsConst type trait tests whether or not the given temp...
Definition: IsConst.h:75
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:75