Blaze  3.6
IsOdd.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_VALUETRAITS_ISODD_H_
36 #define _BLAZE_UTIL_VALUETRAITS_ISODD_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
72 template< size_t N >
73 struct IsOdd
74  : public BoolConstant< N % 2UL != 0UL >
75 {};
76 //*************************************************************************************************
77 
78 
79 //*************************************************************************************************
92 template< size_t N >
93 constexpr bool IsOdd_v = IsOdd<N>::value;
94 //*************************************************************************************************
95 
96 } // namespace blaze
97 
98 #endif
Compile time check whether a compile time constant expression is odd.This value trait tests whether t...
Definition: IsOdd.h:73
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the IntegralConstant class template.
constexpr bool IsOdd_v
Auxiliary variable template for the IsOdd value trait.The IsOdd_v variable template provides a conven...
Definition: IsOdd.h:93