fix compilation with MinGW

This commit is contained in:
Gael Guennebaud 2011-06-01 12:16:21 +02:00
parent 562d3ea91d
commit 5bc4abc45e

View File

@ -350,15 +350,14 @@ struct blas_traits<SelfCwiseBinaryOp<BinOp,NestedXpr,Rhs> >
template<bool DestIsTransposed, typename OtherDerived> template<bool DestIsTransposed, typename OtherDerived>
struct check_transpose_aliasing_compile_time_selector struct check_transpose_aliasing_compile_time_selector
{ {
enum { ret = blas_traits<OtherDerived>::IsTransposed != DestIsTransposed enum { ret = bool(blas_traits<OtherDerived>::IsTransposed) != DestIsTransposed };
};
}; };
template<bool DestIsTransposed, typename BinOp, typename DerivedA, typename DerivedB> template<bool DestIsTransposed, typename BinOp, typename DerivedA, typename DerivedB>
struct check_transpose_aliasing_compile_time_selector<DestIsTransposed,CwiseBinaryOp<BinOp,DerivedA,DerivedB> > struct check_transpose_aliasing_compile_time_selector<DestIsTransposed,CwiseBinaryOp<BinOp,DerivedA,DerivedB> >
{ {
enum { ret = blas_traits<DerivedA>::IsTransposed != DestIsTransposed enum { ret = bool(blas_traits<DerivedA>::IsTransposed) != DestIsTransposed
|| blas_traits<DerivedB>::IsTransposed != DestIsTransposed || bool(blas_traits<DerivedB>::IsTransposed) != DestIsTransposed
}; };
}; };
@ -367,7 +366,7 @@ struct check_transpose_aliasing_run_time_selector
{ {
static bool run(const Scalar* dest, const OtherDerived& src) static bool run(const Scalar* dest, const OtherDerived& src)
{ {
return (blas_traits<OtherDerived>::IsTransposed != DestIsTransposed) && (dest!=0 && dest==(Scalar*)extract_data(src)); return (bool(blas_traits<OtherDerived>::IsTransposed) != DestIsTransposed) && (dest!=0 && dest==(Scalar*)extract_data(src));
} }
}; };