All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsComplex.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_TYPETRAITS_ISCOMPLEX_H_
23 #define _BLAZE_UTIL_TYPETRAITS_ISCOMPLEX_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <blaze/util/Complex.h>
31 #include <blaze/util/FalseType.h>
32 #include <blaze/util/TrueType.h>
33 
34 
35 namespace blaze {
36 
37 //=================================================================================================
38 //
39 // CLASS DEFINITION
40 //
41 //=================================================================================================
42 
43 //*************************************************************************************************
62 template< typename T >
63 struct IsComplex : public FalseType
64 {
65  public:
66  //**********************************************************************************************
68  enum { value = 0 };
69  typedef FalseType Type;
71  //**********************************************************************************************
72 };
73 //*************************************************************************************************
74 
75 
76 //*************************************************************************************************
78 
79 template< typename T >
80 struct IsComplex< complex<T> > : public TrueType
81 {
82  public:
83  //**********************************************************************************************
84  enum { value = 1 };
85  typedef TrueType Type;
86  //**********************************************************************************************
87 };
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
94 
95 template< typename T >
96 struct IsComplex< const complex<T> > : public TrueType
97 {
98  public:
99  //**********************************************************************************************
100  enum { value = 1 };
101  typedef TrueType Type;
102  //**********************************************************************************************
103 };
105 //*************************************************************************************************
106 
107 
108 //*************************************************************************************************
110 
111 template< typename T >
112 struct IsComplex< volatile complex<T> > : public TrueType
113 {
114  public:
115  //**********************************************************************************************
116  enum { value = 1 };
117  typedef TrueType Type;
118  //**********************************************************************************************
119 };
121 //*************************************************************************************************
122 
123 
124 //*************************************************************************************************
126 
127 template< typename T >
128 struct IsComplex< const volatile complex<T> > : public TrueType
129 {
130  public:
131  //**********************************************************************************************
132  enum { value = 1 };
133  typedef TrueType Type;
134  //**********************************************************************************************
135 };
137 //*************************************************************************************************
138 
139 } // namespace blaze
140 
141 #endif