UnderlyingElement.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_UNDERLYINGELEMENT_H_
36 #define _BLAZE_MATH_TYPETRAITS_UNDERLYINGELEMENT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/mpl/If.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
78 template< typename T >
80 {
81  private:
82  //**struct Builtin******************************************************************************
84  template< typename T2 >
85  struct Builtin { using Type = T2; };
87  //**********************************************************************************************
88 
89  //**struct Complex******************************************************************************
91  template< typename T2 >
92  struct Complex { using Type = typename T2::value_type; };
94  //**********************************************************************************************
95 
96  //**struct Other********************************************************************************
98  template< typename T2 >
99  struct Other { using Type = typename T2::ElementType; };
101  //**********************************************************************************************
102 
103  public:
104  //**********************************************************************************************
106  using Type = typename If_< IsBuiltin<T>
107  , Builtin<T>
109  , Complex<T>
110  , Other<T> >
111  >::Type;
113  //**********************************************************************************************
114 };
115 //*************************************************************************************************
116 
117 
118 //*************************************************************************************************
131 template< typename T >
133 //*************************************************************************************************
134 
135 } // namespace blaze
136 
137 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3079
typename UnderlyingElement< T >::Type UnderlyingElement_
Auxiliary alias declaration for the UnderlyingElement type trait.The UnderlyingElement_ alias declara...
Definition: UnderlyingElement.h:132
Evaluation of the element type of a given data type.Via this type trait it is possible to evaluate th...
Definition: UnderlyingElement.h:79
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 IsBuiltin type trait.
Header file for the IsComplex type trait.