Re: [eigen] VS2008 triangularView compiler error |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Hello,
I’ve just updated Eigen development branch. I use MSVS 2008 for compiling this code:
// HelperTest.cpp
#include <Eigen\Core>
#include <Eigen\QR>
int main(int argc, char* argv[])
{
typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> Matrix;
int numberOfObservations = 100;
int numberOfParameters = 10;
Matrix J =Matrix::Random(numberOfObservations, numberOfParameters);
Eigen::ColPivHouseholderQR<Matrix> colPivHouseholderQR;
colPivHouseholderQR.compute(J);
Matrix R = Matrix::Zero(numberOfParameters, numberOfParameters);
R.triangularView<Eigen::Upper>() =
colPivHouseholderQR.matrixQR().
topLeftCorner(numberOfParameters, numberOfParameters).
triangularView<Eigen::Upper>(); // Line 20
}
With recent version of Eigen the Compiler issues an error message
Compiling...
HelperTest.cpp
eigen\eigen\src\core\triangularmatrix.h(549) : error C2248: 'Eigen::TriangularView<_MatrixType,_Mode>::DenseMatrixType' : cannot access protected typedef declared in class 'Eigen::TriangularView<_MatrixType,_Mode>'
with[
_MatrixType=Eigen::Block<EIGEN::MATRIX,-1,-1,false>,
_Mode=2
]
eigen\eigen\src\core\triangularmatrix.h(160) : see declaration of 'Eigen::TriangularView<_MatrixType,_Mode>::DenseMatrixType'
with[
_MatrixType=Eigen::Block<EIGEN::MATRIX,-1,-1,false>,
_Mode=2
]
helpertest.cpp(20) : see reference to function template instantiation
'Eigen::TriangularView<_MatrixType,_Mode> &Eigen::TriangularView<_MatrixType,_Mode>::operator =<EIGEN::TRIANGULARVIEW>(const Eigen::TriangularBase<EIGEN::TRIANGULARVIEW> &)' being compiled
with
[
_MatrixType=Eigen::Matrix,
_Mode=2,
Derived=Eigen::Block<EIGEN::MATRIX,-1,-1,false>]
What’s wrong with this code?
Thanks,
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/ |