This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Compiler error

Tags: None
(comma "," separated)
bn999
Registered Member
Posts
1
Karma
0

Compiler error

Mon Oct 10, 2011 10:29 pm
Coming from C, I'm not very well versed at C++. I'm getting a compiler error which is not too descriptive. This code:
Code: Select all
#include <iostream>
#include <Eigen/Dense>

using namespace Eigen;

template <typename Derived>
void matDiv(const MatrixBase<Derived> &A) {
        MatrixBase <Derived> R;

        HouseholderQR<Derived> qr(A);

        R = qr.matrixQR().triangularView<UnitUpper>();
}


Generates this error:
Code: Select all
test.cc: In function ‘void matDiv(const Eigen::MatrixBase<Derived>&)’:
test.cc:12: error: expected primary-expression before ‘)’ token


Anyone know why?
mattd
Registered Member
Posts
28
Karma
0

Re: Compiler error

Mon Oct 10, 2011 11:41 pm
Use ".template triangularView" instead of ".triangularView".
See here for the reasons why: viewtopic.php?f=74&t=96583&p=203029#p203029


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]