UnderlyingNumeric.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_UNDERLYINGNUMERIC_H_
36 #define _BLAZE_MATH_TYPETRAITS_UNDERLYINGNUMERIC_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 //*************************************************************************************************
79 template< typename T >
81 {
82  private:
83  //**struct BuiltinOrComplex*********************************************************************
85  template< typename T2 >
86  struct BuiltinOrComplex { using Type = T2; };
88  //**********************************************************************************************
89 
90  //**struct Other********************************************************************************
92  template< typename T2 >
93  struct Other { using Type = typename UnderlyingNumeric<typename T2::ElementType>::Type; };
95  //**********************************************************************************************
96 
97  public:
98  //**********************************************************************************************
100  using Type = typename If_t< IsBuiltin_v<T> || IsComplex_v<T>
101  , BuiltinOrComplex<T>
102  , Other<T> >::Type;
104  //**********************************************************************************************
105 };
106 //*************************************************************************************************
107 
108 
109 //*************************************************************************************************
122 template< typename T >
124 //*************************************************************************************************
125 
126 } // namespace blaze
127 
128 #endif
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
typename UnderlyingNumeric< T >::Type UnderlyingNumeric_t
Auxiliary alias declaration for the UnderlyingNumeric type trait.The UnderlyingNumeric_t alias declar...
Definition: UnderlyingNumeric.h:123
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Evaluation of the underlying numeric element type of a given data type.Via this type trait it is poss...
Definition: UnderlyingNumeric.h:80
Header file for the IsBuiltin type trait.
Header file for the IsComplex type trait.