Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
util
typetraits
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/IntegralConstant.h
>
44
45
46
namespace
blaze {
47
48
//=================================================================================================
49
//
50
// CLASS DEFINITION
51
//
52
//=================================================================================================
53
54
//*************************************************************************************************
71
template
<
typename
T >
72
struct
Rank
73
:
public
IntegralConstant
<size_t,0UL>
74
{};
75
//*************************************************************************************************
76
77
78
//*************************************************************************************************
81
template
<
typename
T >
82
struct
Rank
<T[]>
83
:
public
IntegralConstant
<size_t,1UL+Rank<T>::value>
84
{};
86
//*************************************************************************************************
87
88
89
//*************************************************************************************************
92
template
<
typename
T,
unsigned
int
N >
93
struct
Rank<T[N]>
94
:
public
IntegralConstant<size_t,1UL+Rank<T>::value>
95
{};
97
//*************************************************************************************************
98
99
100
//*************************************************************************************************
113
template
<
typename
T >
114
constexpr
size_t
Rank_v
=
Rank<T>::value
;
115
//*************************************************************************************************
116
117
}
// namespace blaze
118
119
#endif
IntegralConstant.h
Header file for the IntegralConstant class template.
blaze::Rank_v
constexpr size_t Rank_v
Auxiliary variable template for the Rank type trait.
Definition
Rank.h:114
blaze::IntegralConstant
Generic wrapper for a compile time constant integral value.
Definition
IntegralConstant.h:74
blaze::Rank
Compile time check for array ranks.
Definition
Rank.h:74
Generated by
1.18.0