Blaze 3.9
IntegralConstant.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_UTIL_INTEGRALCONSTANT_H_
36#define _BLAZE_UTIL_INTEGRALCONSTANT_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <type_traits>
44#include <blaze/util/Types.h>
45
46
47namespace blaze {
48
49//=================================================================================================
50//
51// CLASS DEFINITION
52//
53//=================================================================================================
54
55//*************************************************************************************************
71template< typename T, T N >
73 : public std::integral_constant<T,N>
74{
75 //**********************************************************************************************
77 using ValueType = T;
78 using Type = IntegralConstant<T,N>;
80 //**********************************************************************************************
81};
82//*************************************************************************************************
83
84
85
86
87//=================================================================================================
88//
89// ALIAS DECLARATIONS
90//
91//=================================================================================================
92
93//*************************************************************************************************
109template< bool B >
111//*************************************************************************************************
112
113
114//*************************************************************************************************
122//*************************************************************************************************
123
124
125//*************************************************************************************************
133//*************************************************************************************************
134
135
136//*************************************************************************************************
152template< bool B >
154//*************************************************************************************************
155
156
157//*************************************************************************************************
173template< char N >
175//*************************************************************************************************
176
177
178//*************************************************************************************************
194template< int N >
196//*************************************************************************************************
197
198
199//*************************************************************************************************
215template< long N >
217//*************************************************************************************************
218
219
220//*************************************************************************************************
236template< ptrdiff_t N >
238//*************************************************************************************************
239
240
241//*************************************************************************************************
257template< size_t N >
259//*************************************************************************************************
260
261
262
263
264//=================================================================================================
265//
266// GLOBAL FUNCTIONS
267//
268//=================================================================================================
269
270//*************************************************************************************************
279template< bool B >
281{
282 return BoolConstant<!B>();
283}
284//*************************************************************************************************
285
286
287//*************************************************************************************************
296template< bool B1, bool B2 >
298{
300}
301//*************************************************************************************************
302
303
304//*************************************************************************************************
313template< bool B1, bool B2 >
315{
317}
318//*************************************************************************************************
319
320} // namespace blaze
321
322#endif
constexpr BoolConstant<!B > operator!(BoolConstant< B >) noexcept
Logical NOT of a boolean constant.
Definition: IntegralConstant.h:280
constexpr BoolConstant< B1 &&B2 > operator&&(BoolConstant< B1 >, BoolConstant< B2 >) noexcept
Logical AND of two boolean constants.
Definition: IntegralConstant.h:297
constexpr BoolConstant< B1||B2 > operator||(BoolConstant< B1 >, BoolConstant< B2 >) noexcept
Logical OR of two boolean constants.
Definition: IntegralConstant.h:314
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
Header file for basic type definitions.