Matrix::setRandom() error: no matching function for call to 'Eigen::internal::scalar_random_op<double>::operator()(int, int) const'
Submitted by Angelos Mantzaflaris
Assigned to Nobody
Link to original bugzilla bug (#1351)
Version: 3.3 (current stable)
Platform: x86 - general
Description
On Suse Linux Enterprise, using GNU 4.3.4, using the code:
Eigen::Matrix A(2,2);
A.setRandom() // or even A.setRandom(2,2)
with Eigen 3.3 release, the compilation fails with:
Eigen/src/Core/util/Meta.h:410: error: no matching function for call to 'Eigen::internal::scalar_random_op<double>::operator()(int, int) const'
Eigen/src/Core/Random.h:19: note: candidates are: const Scalar Eigen::internal::scalar_random_op<Scalar>::operator()() const [with Scalar = double]
Eigen/src/Core/util/Meta.h: In instantiation of 'Eigen::internal::has_unary_operator<Eigen::internal::scalar_random_op<double>, int>':
Eigen/src/Core/CoreEvaluators.h:510: instantiated from 'Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_random_op<double>, Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001> > >'
Eigen/src/Core/AssignEvaluator.h:705: instantiated from 'void Eigen::internal::call_dense_assignment_loop(DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001>, SrcXprType = Eigen::CwiseNullaryOp<Eigen::internal::scalar_random_op<double>, Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001> >, Functor = Eigen::internal::assign_op<double, double>]'
Eigen/src/Core/AssignEvaluator.h:857: instantiated from 'static void Eigen::internal::Assignment<DstXprType, SrcXprType, Functor, Eigen::internal::Dense2Dense, Weak>::run(DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001>, SrcXprType = Eigen::CwiseNullaryOp<Eigen::internal::scalar_random_op<double>, Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001> >, Functor = Eigen::internal::assign_op<double, double>, Weak = void]'
Eigen/src/Core/AssignEvaluator.h:814: instantiated from 'void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001>, Src = Eigen::CwiseNullaryOp<Eigen::internal::scalar_random_op<double>, Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001> >, Func = Eigen::internal::assign_op<double, double>]'
Eigen/src/Core/AssignEvaluator.h:782: instantiated from 'void Eigen::internal::call_assignment(Dst&, const Src&, const Func&, typename Eigen::internal::enable_if<(! Eigen::internal::evaluator_assume_aliasing::value), void*>::type) [with Dst = Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001>, Src = Eigen::CwiseNullaryOp<Eigen::internal::scalar_random_op<double>, Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001> >, Func = Eigen::internal::assign_op<double, double>]'
Eigen/src/Core/AssignEvaluator.h:760: instantiated from 'void Eigen::internal::call_assignment(Dst&, const Src&) [with Dst = Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001>, Src = Eigen::CwiseNullaryOp<Eigen::internal::scalar_random_op<double>, Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001> >]'
Eigen/src/Core/Assign.h:41: instantiated from 'Derived& Eigen::DenseBase<Derived>::operator=(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::CwiseNullaryOp<Eigen::internal::scalar_random_op<double>, Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001> >, Derived = Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001>]'
Eigen/src/Core/Random.h:133: instantiated from 'Derived& Eigen::DenseBase<Derived>::setRandom() [with Derived = Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001>]'
Eigen/src/Core/Random.h:177: instantiated from 'Derived& Eigen::PlainObjectBase<Derived>::setRandom(Eigen::Index, Eigen::Index) [with Derived = Eigen::Matrix<double, -0x000000001, -0x000000001, 0, -0x000000001, -0x000000001>]'
Eigen/src/Core/util/Meta.h:401: error: no matching function for call to 'Eigen::internal::scalar_random_op<double>::operator()(int) const'
Eigen/src/Core/Random.h:19: note: candidates are: const Scalar Eigen::internal::scalar_random_op<Scalar>::operator()() const [with Scalar = double]
I do not have direct access to this machine, the error appears when compiling my project in the OpenSuse build service, full log:
https://build.opensuse.org/public/build/home:filiatra/SLE_11_SP4/i586/gismo/_log