DeclLowExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_DECLLOWEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_DECLLOWEXPRTRAIT_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 T > // Type of the decllow operand
70 {
71  private:
72  //**struct Failure******************************************************************************
74  struct Failure { using Type = INVALID_TYPE; };
76  //**********************************************************************************************
77 
78  //**struct Result*******************************************************************************
80  struct Result { using Type = decltype( decllow( std::declval<T>() ) ); };
82  //**********************************************************************************************
83 
84  public:
85  //**********************************************************************************************
87  using Type = typename If_< IsMatrix< RemoveReference_<T> >
88  , Result
89  , Failure >::Type;
91  //**********************************************************************************************
92 };
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
109 template< typename T > // Type of the decllow operand
111 //*************************************************************************************************
112 
113 } // namespace blaze
114 
115 #endif
Header file for the IsMatrix type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1026
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 DeclLowExprTrait< T >::Type DeclLowExprTrait_
Auxiliary alias declaration for the DeclLowExprTrait class template.The DeclLowExprTrait_ alias decla...
Definition: DeclLowExprTrait.h:110
Evaluation of the return type of a lower declaration (decllow) expression.Via this type trait it is p...
Definition: DeclLowExprTrait.h:69