Blaze  3.6
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 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
76 template< size_t M, size_t N >
78  : public BoolConstant< M % N == 0UL >
79 {};
80 //*************************************************************************************************
81 
82 
83 //*************************************************************************************************
88 template< size_t M >
89 struct IsMultipleOf<M,0UL>
90  : public FalseType
91 {};
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
101 template<>
102 struct IsMultipleOf<0,0>
103  : public TrueType
104 {};
106 //*************************************************************************************************
107 
108 
109 //*************************************************************************************************
122 template< size_t M, size_t N >
124 //*************************************************************************************************
125 
126 } // namespace blaze
127 
128 #endif
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
Compile time check for a multiplicative relationship of two integral values.This value trait tests wh...
Definition: IsMultipleOf.h:77
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the IntegralConstant class template.
constexpr bool IsMultipleOf_v
Auxiliary variable template for the IsMultipleOf value trait.The IsMultipleOf_v variable template pro...
Definition: IsMultipleOf.h:123