Maybe someone knows, is it possible in the Eigen to forward declare types MatrixXd & VectorXd?
While compiling, I get the following error:
/usr/include/eigen3/Eigen/src/Core/Matrix.h:372:34: error: conflicting declaration ‘typedef class Eigen::Matrix Eigen::MatrixXd’
typedef Matrix Matrix##SizeSuffix##TypeSuffix;
SIMP.h
#ifndef SIMP_H
#define SIMP_H
namespace Eigen
{
class MatrixXd;
class VectorXd;
}
class SIMP {
public:
SIMP(Eigen::MatrixXd * gsm, Eigen::VectorXd * displ);
SIMP ( const SIMP& other ) = delete;
~SIMP(){}
SIMP& operator= ( const SIMP& other ) = delete;
bool operator== ( const SIMP& other ) = delete;
private:
Eigen::MatrixXd * m_gsm;
Eigen::VectorXd * m_displ;
};
#endif // SIMP_H
SIMP.cpp
#include "SIMP.h"
#include <Eigen/Core>
SIMP::SIMP( Eigen::MatrixXd * gsm, Eigen::VectorXd * displ) :
m_gsm(gsm),
m_displ(displ),
{
}