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 
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
71 template< typename T >
72 struct Rank : public IntegralConstant<size_t,0UL>
73 {};
74 //*************************************************************************************************
75 
76 
77 //*************************************************************************************************
79 template< typename T >
81 struct Rank<T[]> : public IntegralConstant<size_t,1UL+Rank<T>::value>
82 {};
84 //*************************************************************************************************
85 
86 
87 //*************************************************************************************************
89 template< typename T, unsigned int N >
91 struct Rank<T[N]> : public IntegralConstant<size_t,1UL+Rank<T>::value>
92 {};
94 //*************************************************************************************************
95 
96 } // namespace blaze
97 
98 #endif
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time check for array ranks.This type trait determines the rank of the given template argument...
Definition: Rank.h:72
Header file for the IntegralConstant class template.