fix MSVC stupid warnings

This commit is contained in:
Gael Guennebaud 2009-01-29 09:45:25 +00:00
parent 1752a3a677
commit cf0857c44d

View File

@ -40,10 +40,8 @@ class DiagonalMatrixBase : ei_no_assignment_operator,
protected: protected:
typedef typename ei_cleantype<CoeffsVectorType>::type _CoeffsVectorType; typedef typename ei_cleantype<CoeffsVectorType>::type _CoeffsVectorType;
template<typename OtherDerived, // MSVC gets crazy if we define default parameters
bool IsVector = OtherDerived::IsVectorAtCompileTime, template<typename OtherDerived, bool IsVector, bool IsDiagonal> struct construct_from_expression;
bool IsDiagonal = (OtherDerived::Flags&Diagonal)==Diagonal>
struct construct_from_expression;
// = vector // = vector
template<typename OtherDerived> template<typename OtherDerived>
@ -69,7 +67,8 @@ class DiagonalMatrixBase : ei_no_assignment_operator,
template<typename OtherDerived> template<typename OtherDerived>
inline DiagonalMatrixBase(const MatrixBase<OtherDerived>& other) inline DiagonalMatrixBase(const MatrixBase<OtherDerived>& other)
{ {
construct_from_expression<OtherDerived>::run(derived(),other.derived()); construct_from_expression<OtherDerived,OtherDerived::IsVectorAtCompileTime,(OtherDerived::Flags&Diagonal)==Diagonal>
::run(derived(),other.derived());
} }
public: public:
@ -93,7 +92,8 @@ class DiagonalMatrixBase : ei_no_assignment_operator,
template<typename OtherDerived> template<typename OtherDerived>
inline Derived& operator=(const MatrixBase<OtherDerived>& other) inline Derived& operator=(const MatrixBase<OtherDerived>& other)
{ {
construct_from_expression<OtherDerived>::run(derived(),other); construct_from_expression<OtherDerived,OtherDerived::IsVectorAtCompileTime,(OtherDerived::Flags&Diagonal)==Diagonal>
::run(derived(),other);
return derived(); return derived();
} }