All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BaseElementType.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TYPETRAITS_BASEELEMENTTYPE_H_
23 #define _BLAZE_MATH_TYPETRAITS_BASEELEMENTTYPE_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 //*************************************************************************************************
59 template< typename T >
61 {
62  private:
63  //**struct Numeric******************************************************************************
65  template< typename T2 >
66  struct Numeric { typedef T2 Type; };
68  //**********************************************************************************************
69 
70  //**struct Other********************************************************************************
72  template< typename T2 >
73  struct Other { typedef typename BaseElementType<typename T2::ElementType>::Type Type; };
75  //**********************************************************************************************
76 
77  public:
78  //**********************************************************************************************
80  typedef typename If< IsNumeric<T>, Numeric<T>, Other<T> >::Type::Type Type;
82  //**********************************************************************************************
83 };
84 //*************************************************************************************************
85 
86 } // namespace blaze
87 
88 #endif