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 
43 #include <blaze/util/FalseType.h>
45 #include <blaze/util/TrueType.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
78 template< size_t M, size_t N >
79 struct IsMultipleOf : public BoolConstant< M % N == 0UL >
80 {};
81 //*************************************************************************************************
82 
83 
84 //*************************************************************************************************
89 template< size_t M >
90 struct IsMultipleOf<M,0UL> : public FalseType
91 {};
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
101 template<>
102 struct IsMultipleOf<0,0> : public TrueType
103 {};
105 //*************************************************************************************************
106 
107 } // namespace blaze
108 
109 #endif
Header file for the FalseType type/value trait base class.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Compile time check for a multiplicative relationship of two integral values.This value trait tests wh...
Definition: IsMultipleOf.h:79
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IntegralConstant class template.
Header file for the TrueType type/value trait base class.