DeclDiagTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_DECLDIAGTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_DECLDIAGTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
45 #include <blaze/util/InvalidType.h>
46 #include <blaze/util/mpl/If.h>
47 #include <blaze/util/mpl/Or.h>
52 
53 
54 namespace blaze {
55 
56 //=================================================================================================
57 //
58 // CLASS DEFINITION
59 //
60 //=================================================================================================
61 
62 //*************************************************************************************************
132 template< typename MT > // Type of the matrix
134 {
135  private:
136  //**********************************************************************************************
138  struct Failure { using Type = INVALID_TYPE; };
140  //**********************************************************************************************
141 
142  //**********************************************************************************************
144  struct Result { using Type = DiagonalMatrix<MT>; };
146  //**********************************************************************************************
147 
148  public:
149  //**********************************************************************************************
151  using Type = typename If_< Or< IsConst<MT>, IsVolatile<MT>, IsReference<MT> >
154  , Result
155  , Failure > >::Type;
157  //**********************************************************************************************
158 };
159 //*************************************************************************************************
160 
161 
162 //*************************************************************************************************
175 template< typename MT > // Type of the matrix
177 //*************************************************************************************************
178 
179 } // namespace blaze
180 
181 #endif
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:75
Header file for the IsVolatile type trait.
Header file for the IsMatrix type trait.
Header file for the Decay type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Header file for the Or class template.
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.
Header file for the implementation of the base template of the DiagonalMatrix.
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:75
Matrix adapter for diagonal matrices.
Definition: BaseTemplate.h:560
typename DeclDiagTrait< MT >::Type DeclDiagTrait_
Auxiliary alias declaration for the DeclDiagTrait type trait.The DeclDiagTrait_ alias declaration pro...
Definition: DeclDiagTrait.h:176
Base template for the DeclDiagTrait class.
Definition: DeclDiagTrait.h:133