All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NumericElementType.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_NUMERICELEMENTTYPE_H_
36 #define _BLAZE_MATH_TYPETRAITS_NUMERICELEMENTTYPE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/mpl/If.h>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
73 template< typename T >
75 {
76  private:
77  //**struct Numeric******************************************************************************
79  template< typename T2 >
80  struct Numeric { typedef T2 Type; };
82  //**********************************************************************************************
83 
84  //**struct Other********************************************************************************
86  template< typename T2 >
87  struct Other { typedef typename NumericElementType<typename T2::ElementType>::Type Type; };
89  //**********************************************************************************************
90 
91  public:
92  //**********************************************************************************************
94  typedef typename If< IsNumeric<T>, Numeric<T>, Other<T> >::Type::Type Type;
96  //**********************************************************************************************
97 };
98 //*************************************************************************************************
99 
100 } // namespace blaze
101 
102 #endif
Compile time type selection.The If class template selects one of the two given types T2 and T3 depend...
Definition: If.h:112
Header file for the If class template.
Header file for the IsNumeric type trait.
Evaluation of the numeric element type of a given data type.Via this type trait it is possible to eva...
Definition: NumericElementType.h:74