blaze::IsCommutative< T1, T2, typename > Struct Template Reference

Compile time check for the commutativity of data types.This type trait tests whether or not the two given data types T1 and T2 are commutative with respect to mathematical operations. If the types are commutative, the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType. More...

#include <IsCommutative.h>

Inherits blaze::IntegralConstant< T, N >.

Detailed Description

template<typename T1, typename T2, typename = void>
struct blaze::IsCommutative< T1, T2, typename >

Compile time check for the commutativity of data types.

This type trait tests whether or not the two given data types T1 and T2 are commutative with respect to mathematical operations. If the types are commutative, the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType.

using VT = StaticVector<int,3UL>;
using MT = StaticMatrix<int,3UL,3UL>;
blaze::IsCommutative< DynamicVector<int>, DynamicVector<int> >::Type // Results in TrueType
blaze::IsCommutative< DynamicMatrix<VT>, DynamicMatrix<VT> > // Is derived from TrueType
blaze::IsCommutative< DynamicMatrix<int>, DynamicVector<int> >::value // Evaluates to 0
blaze::IsCommutative< DynamicVector<MT>, DynamicVector<VT> >::Type // Results in FalseType
blaze::IsCommutative< DynamicMatrix<VT>, DynamicMatrix<MT> > // Is derived from FalseType

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