Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
util
typetraits
Extent.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_UTIL_TYPETRAITS_EXTENT_H_
36
#define _BLAZE_UTIL_TYPETRAITS_EXTENT_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/util/IntegralConstant.h
>
44
#include <
blaze/util/Types.h
>
45
46
47
namespace
blaze {
48
49
//=================================================================================================
50
//
51
// CLASS DEFINITION
52
//
53
//=================================================================================================
54
55
//*************************************************************************************************
76
template
<
typename
T,
size_t
N >
77
struct
Extent
78
:
public
IntegralConstant
<size_t,0UL>
79
{};
80
//*************************************************************************************************
81
82
83
//*************************************************************************************************
86
template
<
typename
T,
size_t
N >
87
struct
Extent
<T[],N>
88
:
public
IntegralConstant
<size_t,Extent<T,N-1UL>::value>
89
{};
91
//*************************************************************************************************
92
93
94
//*************************************************************************************************
97
template
<
typename
T,
size_t
N,
size_t
E >
98
struct
Extent<T[E],N>
99
:
public
IntegralConstant<size_t,Extent<T,N-1UL>::value>
100
{};
102
//*************************************************************************************************
103
104
105
//*************************************************************************************************
108
template
<
typename
T >
109
struct
Extent
<T[],0UL>
110
:
public
IntegralConstant
<size_t,0UL>
111
{};
113
//*************************************************************************************************
114
115
116
//*************************************************************************************************
119
template
<
typename
T,
size_t
E >
120
struct
Extent
<T[E],0UL>
121
:
public
IntegralConstant
<size_t,E>
122
{};
124
//*************************************************************************************************
125
126
127
//*************************************************************************************************
140
template
<
typename
T,
size_t
N >
141
constexpr
size_t
Extent_v
=
Extent<T,N>::value
;
142
//*************************************************************************************************
143
144
}
// namespace blaze
145
146
#endif
IntegralConstant.h
Header file for the IntegralConstant class template.
blaze::Extent_v
constexpr size_t Extent_v
Auxiliary variable template for the Extent type trait.
Definition
Extent.h:141
blaze::Extent
Compile time check for the size of array bounds.
Definition
Extent.h:79
blaze::IntegralConstant
Generic wrapper for a compile time constant integral value.
Definition
IntegralConstant.h:74
Types.h
Header file for basic type definitions.
Generated by
1.18.0