All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsDenseVector.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TYPETRAITS_ISDENSEVECTOR_H_
23 #define _BLAZE_MATH_TYPETRAITS_ISDENSEVECTOR_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <boost/type_traits/is_base_of.hpp>
31 #include <boost/type_traits/remove_cv.hpp>
32 #include <blaze/util/FalseType.h>
33 #include <blaze/util/SelectType.h>
34 #include <blaze/util/TrueType.h>
35 
36 
37 namespace blaze {
38 
39 //=================================================================================================
40 //
41 // ::blaze NAMESPACE FORWARD DECLARATIONS
42 //
43 //=================================================================================================
44 
45 template< typename, bool > struct DenseVector;
46 
47 
48 
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
61 template< typename T >
62 struct IsDenseVectorHelper
63 {
64  private:
65  //**********************************************************************************************
66  typedef typename boost::remove_cv<T>::type T2;
67  //**********************************************************************************************
68 
69  public:
70  //**********************************************************************************************
71  enum { value = boost::is_base_of< DenseVector<T2,false>, T2 >::value ||
72  boost::is_base_of< DenseVector<T2,true >, T2 >::value };
73  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
74  //**********************************************************************************************
75 };
77 //*************************************************************************************************
78 
79 
80 //*************************************************************************************************
99 template< typename T >
100 struct IsDenseVector : public IsDenseVectorHelper<T>::Type
101 {
102  public:
103  //**********************************************************************************************
105  enum { value = IsDenseVectorHelper<T>::value };
106  typedef typename IsDenseVectorHelper<T>::Type Type;
108  //**********************************************************************************************
109 };
110 //*************************************************************************************************
111 
112 } // namespace blaze
113 
114 #endif