Blaze 3.9
IsMultipleOf.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_UTIL_VALUETRAITS_ISMULTIPLEOF_H_
36#define _BLAZE_UTIL_VALUETRAITS_ISMULTIPLEOF_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
44
45
46namespace blaze {
47
48//=================================================================================================
49//
50// CLASS DEFINITION
51//
52//=================================================================================================
53
54//*************************************************************************************************
76template< size_t M, size_t N >
78 : public BoolConstant< M % N == 0UL >
79{};
80//*************************************************************************************************
81
82
83//*************************************************************************************************
88template< size_t M >
89struct IsMultipleOf<M,0UL>
90 : public FalseType
91{};
93//*************************************************************************************************
94
95
96//*************************************************************************************************
101template<>
102struct IsMultipleOf<0,0>
103 : public TrueType
104{};
106//*************************************************************************************************
107
108
109//*************************************************************************************************
122template< size_t M, size_t N >
124//*************************************************************************************************
125
126} // namespace blaze
127
128#endif
Header file for the IntegralConstant class template.
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
constexpr bool IsMultipleOf_v
Auxiliary variable template for the IsMultipleOf value trait.
Definition: IsMultipleOf.h:123
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
Compile time check for a multiplicative relationship of two integral values.
Definition: IsMultipleOf.h:79