All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NumericElementType.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TYPETRAITS_NUMERICELEMENTTYPE_H_
23 #define _BLAZE_MATH_TYPETRAITS_NUMERICELEMENTTYPE_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <blaze/util/mpl/If.h>
32 
33 
34 namespace blaze {
35 
36 //=================================================================================================
37 //
38 // CLASS DEFINITION
39 //
40 //=================================================================================================
41 
42 //*************************************************************************************************
60 template< typename T >
62 {
63  private:
64  //**struct Numeric******************************************************************************
66  template< typename T2 >
67  struct Numeric { typedef T2 Type; };
69  //**********************************************************************************************
70 
71  //**struct Other********************************************************************************
73  template< typename T2 >
74  struct Other { typedef typename NumericElementType<typename T2::ElementType>::Type Type; };
76  //**********************************************************************************************
77 
78  public:
79  //**********************************************************************************************
81  typedef typename If< IsNumeric<T>, Numeric<T>, Other<T> >::Type::Type Type;
83  //**********************************************************************************************
84 };
85 //*************************************************************************************************
86 
87 } // namespace blaze
88 
89 #endif