Clean handling for void type in EIGEN_CHECK_BINARY_COMPATIBILIY

This commit is contained in:
Gael Guennebaud
2016-06-06 23:11:38 +02:00
parent 3d71d3918e
commit 2c462f4201
2 changed files with 25 additions and 7 deletions

View File

@@ -430,6 +430,30 @@ struct ScalarBinaryOpTraits<T,T,BinaryOp>
typedef T ReturnType;
};
// For Matrix * Permutation
template<typename T, typename BinaryOp>
struct ScalarBinaryOpTraits<T,void,BinaryOp>
{
enum { Defined = 1 };
typedef T ReturnType;
};
// For Permutation * Matrix
template<typename T, typename BinaryOp>
struct ScalarBinaryOpTraits<void,T,BinaryOp>
{
enum { Defined = 1 };
typedef T ReturnType;
};
// for Permutation*Permutation
template<typename BinaryOp>
struct ScalarBinaryOpTraits<void,void,BinaryOp>
{
enum { Defined = 1 };
typedef void ReturnType;
};
template<typename T, typename BinaryOp>
struct ScalarBinaryOpTraits<T,std::complex<T>,BinaryOp>
{