DivExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_DIVEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_DIVEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
45 #include <blaze/util/InvalidType.h>
46 #include <blaze/util/mpl/If.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // CLASS DEFINITION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
68 template< typename T1 // Type of the left-hand side division operand
69  , typename T2 > // Type of the right-hand side division operand
71 {
72  private:
73  //**struct Failure******************************************************************************
75  struct Failure { using Type = INVALID_TYPE; };
77  //**********************************************************************************************
78 
79  //**struct Result*******************************************************************************
81  struct Result { using Type = decltype( std::declval<T1>() / std::declval<T2>() ); };
83  //**********************************************************************************************
84 
85  public:
86  //**********************************************************************************************
89  , Result
90  , Failure >::Type;
92  //**********************************************************************************************
93 };
94 //*************************************************************************************************
95 
96 
97 //*************************************************************************************************
110 template< typename T1 // Type of the left-hand side division operand
111  , typename T2 > // Type of the right-hand side division operand
113 //*************************************************************************************************
114 
115 } // namespace blaze
116 
117 #endif
Evaluation of the resulting expression type of a division.Via this type trait it is possible to evalu...
Definition: DivExprTrait.h:70
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
typename RemoveReference< T >::Type RemoveReference_
Auxiliary alias declaration for the RemoveReference type trait.The RemoveReference_ alias declaration...
Definition: RemoveReference.h:95
Header file for the HasDiv 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 RemoveReference type trait.
typename DivExprTrait< T1, T2 >::Type DivExprTrait_
Auxiliary alias declaration for the DivExprTrait class template.The DivExprTrait_ alias declaration p...
Definition: DivExprTrait.h:112