All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Rank.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPETRAITS_RANK_H_
36 #define _BLAZE_UTIL_TYPETRAITS_RANK_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/FalseType.h>
44 #include <blaze/util/TrueType.h>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
72 template< typename T >
73 struct Rank
74 {
75  public:
76  //**********************************************************************************************
78  enum { value = 0 };
80  //**********************************************************************************************
81 };
82 //*************************************************************************************************
83 
84 
85 //*************************************************************************************************
87 template< typename T >
89 struct Rank<T[]>
90 {
91  public:
92  //**********************************************************************************************
93  enum { value = 1 + Rank<T>::value };
94  //**********************************************************************************************
95 };
97 //*************************************************************************************************
98 
99 
100 //*************************************************************************************************
102 template< typename T, unsigned int N >
104 struct Rank<T[N]>
105 {
106  public:
107  //**********************************************************************************************
108  enum { value = 1 + Rank<T>::value };
109  //**********************************************************************************************
110 };
112 //*************************************************************************************************
113 
114 } // namespace blaze
115 
116 #endif
Header file for the FalseType type/value trait base class.
Compile time check for array ranks.This type trait determines the rank of the given template argument...
Definition: Rank.h:73
Header file for the TrueType type/value trait base class.