[eigen] MSVC 2008 error

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

 

VC issues an error

 

Eigen::PermutationMatrix::operator= must return a value.

 

On of overloaded operators, namely

//permutationmatrix.h Ln.126

 

template<int OtherSize, int OtherMaxSize>

    PermutationMatrix& operator=(const Transpositions<OtherSize,OtherMaxSize>& tr)

    {

      setIdentity(tr.size());

      for(int k=size()-1; k>=0; --k)

        applyTranspositionOnTheRight(k,tr.coeff(k));

    }

 

Should be

 

template<int OtherSize, int OtherMaxSize>

    PermutationMatrix& operator=(const Transpositions<OtherSize,OtherMaxSize>& tr)

    {

      setIdentity(tr.size());

      for(int k=size()-1; k>=0; --k)

        applyTranspositionOnTheRight(k,tr.coeff(k));

      return *this;

    }

 

Regards,

 

Oleg Shirokobrod

 



___________________________________________________________________________
This e-mail is confidential and is for the addressee only.   Please refer to
www.oxinst.com/email-statement for regulatory information.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/