Blaze  3.6
blaze::IsOdd< N > Struct Template Reference

Compile time check whether a compile time constant expression is odd.This value trait tests whether the given integral value N is an odd value. In case the value is odd, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...

#include <IsOdd.h>

Inherits blaze::IntegralConstant< T, N >.

Detailed Description

template<size_t N>
struct blaze::IsOdd< N >

Compile time check whether a compile time constant expression is odd.

This value trait tests whether the given integral value N is an odd value. In case the value is odd, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.

blaze::IsOdd<1>::value // Evaluates to 1
blaze::IsOdd<3>::Type // Results in TrueType
blaze::IsOdd<5> // Is derived from TrueType
blaze::IsOdd<2>::value // Evaluates to 0
blaze::IsOdd<4>::Type // Results in FalseType
blaze::IsOdd<6> // Is derived from FalseType

The documentation for this struct was generated from the following file: