Skip to content

Instantly share code, notes, and snippets.

@Bigpet
Last active November 20, 2017 16:52
Show Gist options
  • Save Bigpet/f374bb9677693f7957ec32f8a38a5626 to your computer and use it in GitHub Desktop.
Save Bigpet/f374bb9677693f7957ec32f8a38a5626 to your computer and use it in GitHub Desktop.
Eigen issue with VS2013
#include <iostream>
#include <Eigen\Dense>
template<typename T>
struct type{};
int main() {
Eigen::Vector3d vec;
vec << 0, 0, 0;
double val = 4.0;
vec *= val;
return 0;
}
1> ConsoleApplication1.cpp
1>d:\dev\libraries\eigen_3_2_6\eigen\src/Core/CoreEvaluators.h(375): error C2064: term does not evaluate to a function taking 2 arguments
1> class does not define an 'operator()' or a user defined conversion operator to a pointer-to-function or reference-to-function that takes appropriate number of arguments
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/CoreEvaluators.h(512) : see reference to function template instantiation 'Scalar Eigen::internal::nullary_wrapper<Scalar,NullaryOp,true,true,true>::operator ()<IndexType>(const NullaryOp &,IndexType,IndexType) const' being compiled
1> with
1> [
1> Scalar=double
1> , NullaryOp=Eigen::internal::scalar_constant_op<double>
1> , IndexType=Eigen::Index
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/CoreEvaluators.h(512) : see reference to function template instantiation 'Scalar Eigen::internal::nullary_wrapper<Scalar,NullaryOp,true,true,true>::operator ()<IndexType>(const NullaryOp &,IndexType,IndexType) const' being compiled
1> with
1> [
1> Scalar=double
1> , NullaryOp=Eigen::internal::scalar_constant_op<double>
1> , IndexType=Eigen::Index
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(631) : see reference to function template instantiation 'double Eigen::internal::evaluator<SrcXprType>::coeff<Eigen::Index>(IndexType,IndexType) const' being compiled
1> with
1> [
1> SrcXprType=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , IndexType=Eigen::Index
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(631) : see reference to function template instantiation 'double Eigen::internal::evaluator<SrcXprType>::coeff<Eigen::Index>(IndexType,IndexType) const' being compiled
1> with
1> [
1> SrcXprType=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , IndexType=Eigen::Index
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(630) : while compiling class template member function 'void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorType,SrcEvaluatorType,Functor,0>::assignCoeff(Eigen::Index,Eigen::Index)'
1> with
1> [
1> Functor=Eigen::internal::mul_assign_op<double,double>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(645) : see reference to function template instantiation 'void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorType,SrcEvaluatorType,Functor,0>::assignCoeff(Eigen::Index,Eigen::Index)' being compiled
1> with
1> [
1> Functor=Eigen::internal::mul_assign_op<double,double>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(739) : see reference to class template instantiation 'Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorType,SrcEvaluatorType,Functor,0>' being compiled
1> with
1> [
1> Functor=Eigen::internal::mul_assign_op<double,double>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(879) : see reference to function template instantiation 'void Eigen::internal::call_dense_assignment_loop<DstXprType,SrcXprType,Functor>(DstXprType &,const SrcXprType &,const Functor &)' being compiled
1> with
1> [
1> DstXprType=ActualDstTypeCleaned
1> , SrcXprType=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , Functor=Eigen::internal::mul_assign_op<double,double>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(874) : while compiling class template member function 'void Eigen::internal::Assignment<ActualDstTypeCleaned,Src,Func,Eigen::internal::AssignmentKind<Eigen::DenseShape,Eigen::DenseShape>::Kind,void>::run(DstXprType &,const SrcXprType &,const Functor &)'
1> with
1> [
1> Src=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , Func=Eigen::internal::mul_assign_op<double,double>
1> , DstXprType=ActualDstTypeCleaned
1> , SrcXprType=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , Functor=Eigen::internal::mul_assign_op<double,double>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(836) : see reference to function template instantiation 'void Eigen::internal::Assignment<ActualDstTypeCleaned,Src,Func,Eigen::internal::AssignmentKind<Eigen::DenseShape,Eigen::DenseShape>::Kind,void>::run(DstXprType &,const SrcXprType &,const Functor &)' being compiled
1> with
1> [
1> Src=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , Func=Eigen::internal::mul_assign_op<double,double>
1> , DstXprType=ActualDstTypeCleaned
1> , SrcXprType=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , Functor=Eigen::internal::mul_assign_op<double,double>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(836) : see reference to class template instantiation 'Eigen::internal::Assignment<ActualDstTypeCleaned,Src,Func,Eigen::internal::AssignmentKind<Eigen::DenseShape,Eigen::DenseShape>::Kind,void>' being compiled
1> with
1> [
1> Src=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , Func=Eigen::internal::mul_assign_op<double,double>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/AssignEvaluator.h(804) : see reference to function template instantiation 'void Eigen::internal::call_assignment_no_alias<Dst,Src,Func>(Dst &,const Src &,const Func &)' being compiled
1> with
1> [
1> Dst=Eigen::Matrix<double,3,1,0,3,1>
1> , Src=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , Func=Eigen::internal::mul_assign_op<double,double>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/SelfCwiseBinaryOp.h(21) : see reference to function template instantiation 'void Eigen::internal::call_assignment<Derived,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>,Eigen::internal::mul_assign_op<double,double>>(Dst &,const Src &,const Func &,void *)' being compiled
1> with
1> [
1> Derived=Eigen::Matrix<double,3,1,0,3,1>
1> , Dst=Eigen::Matrix<double,3,1,0,3,1>
1> , Src=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,3,1,0,3,1>>
1> , Func=Eigen::internal::mul_assign_op<double,double>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/SelfCwiseBinaryOp.h(19) : while compiling class template member function 'Eigen::Matrix<double,3,1,0,3,1> &Eigen::DenseBase<Derived>::operator *=(const double &)'
1> with
1> [
1> Derived=Eigen::Matrix<double,3,1,0,3,1>
1> ]
1> ConsoleApplication1.cpp(19) : see reference to function template instantiation 'Eigen::Matrix<double,3,1,0,3,1> &Eigen::DenseBase<Derived>::operator *=(const double &)' being compiled
1> with
1> [
1> Derived=Eigen::Matrix<double,3,1,0,3,1>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/MatrixBase.h(50) : see reference to class template instantiation 'Eigen::DenseBase<Derived>' being compiled
1> with
1> [
1> Derived=Eigen::Matrix<double,3,1,0,3,1>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/PlainObjectBase.h(100) : see reference to class template instantiation 'Eigen::MatrixBase<Derived>' being compiled
1> with
1> [
1> Derived=Eigen::Matrix<double,3,1,0,3,1>
1> ]
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/Matrix.h(180) : see reference to class template instantiation 'Eigen::PlainObjectBase<Eigen::Matrix<double,3,1,0,3,1>>' being compiled
1> ConsoleApplication1.cpp(15) : see reference to class template instantiation 'Eigen::Matrix<double,3,1,0,3,1>' being compiled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment