test cppad: fix scalar type#2880
Open
nim65s wants to merge 1 commit into
Open
Conversation
fix:
```cpp
[ 86%] Building CXX object unittest/cppad/CMakeFiles/pinocchio-test-cpp-cppad-basic.dir/basic.cpp.o
cd /build/source/build/unittest/cppad && /nix/store/qd70v8g0561vm8m33kmnp79z00cgyi5n-gcc-wrapper-15.2.0/bin/g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_FUSION_INVOKE_MAX_ARITY=12 -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -DBOOST_MPL_LIMIT_LIST_SIZE=30 -DBOOST_MPL_LIMIT_VECTOR_SIZE=30 -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -DBOOST_TEST_DYN_LINK -DBOOST_TEST_MODULE=Test -DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK -DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB -DCOAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL -DCOAL_HAS_OCTOMAP -DCOAL_HAVE_OCTOMAP -DCPPAD_DEBUG_AND_RELEASE -DEXAMPLE_ROBOT_DATA_MODEL_DIR=\"/nix/store/c6xq28g752p397cv5688j1b0b49d86fb-example-robot-data-4.4.0/share/example-robot-data/robots\" -DOCTOMAP_MAJOR_VERSION=1 -DOCTOMAP_MINOR_VERSION=10 -DOCTOMAP_PATCH_VERSION=0 -DPINOCCHIO_DISABLE_UNSUPPORTED_WARNINGS -DPINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION -DPINOCCHIO_MODEL_DIR=\"/build/source/models\" -DPINOCCHIO_WITH_COLLISION -I/build/source/build -I/build/source/build/include -I/build/source/include -I/build/source/unittest/cppad -I/build/source/include/pinocchio/deprecated -isystem /nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3 -pedantic -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion -O3 -DNDEBUG -Wno-array-bounds -Wno-maybe-uninitialized -MD -MT unittest/cppad/CMakeFiles/pinocchio-test-cpp-cppad-basic.dir/basic.cpp.o -MF CMakeFiles/pinocchio-test-cpp-cppad-basic.dir/basic.cpp.o.d -o CMakeFiles/pinocchio-test-cpp-cppad-basic.dir/basic.cpp.o -c /build/source/unittest/cppad/basic.cpp
In file included from /nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/Core:164,
from /build/source/include/pinocchio/autodiff/cppad.hpp:14,
from /build/source/unittest/cppad/basic.cpp:5:
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h: In instantiation of 'struct Eigen::internal::traits<const double>':
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:77:7: required from 'class Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>'
77 | class CwiseBinaryOp :
| ^~~~~~~~~~~~~
/build/source/unittest/cppad/basic.cpp:184:26: required from here
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:23:29: error: invalid use of incomplete type 'struct Eigen::internal::traits<double>'
23 | template<typename T> struct traits<const T> : traits<T> {};
| ^~~~~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:17:29: note: declaration of 'struct Eigen::internal::traits<double>'
17 | template<typename T> struct traits;
| ^~~~~~
In file included from /nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/Core:299:
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h: In instantiation of 'class Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>':
/build/source/unittest/cppad/basic.cpp:184:26: required from here
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:77:7: error: no type named 'StorageKind' in 'struct Eigen::internal::traits<const double>'
77 | class CwiseBinaryOp :
| ^~~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:95:77: error: invalid use of incomplete type 'struct Eigen::internal::traits<double>'
95 | BinaryOp>::ret>::Base Base;
| ^~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:17:29: note: declaration of 'struct Eigen::internal::traits<double>'
17 | template<typename T> struct traits;
| ^~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h: In instantiation of 'struct Eigen::internal::traits<Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double> >':
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:96:5: required from 'class Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>'
96 | EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseBinaryOp)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/source/unittest/cppad/basic.cpp:184:26: required from here
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:38:28: error: 'const double' is not a class, struct, or union type
38 | >::type Scalar;
| ^~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:41:62: error: no type named 'StorageKind' in 'struct Eigen::internal::traits<const double>'
41 | BinaryOp>::ret StorageKind;
| ^~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:43:81: error: no type named 'StorageIndex' in 'struct Eigen::internal::traits<const double>'
43 | typename traits<Rhs>::StorageIndex>::type StorageIndex;
| ^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:45:32: error: 'const double' is not a class, struct, or union type
45 | typedef typename Rhs::Nested RhsNested;
| ^~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:47:54: error: 'const double' is not a class, struct, or union type
47 | typedef typename remove_reference<RhsNested>::type _RhsNested;
| ^~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:49:175: error: no type named 'StorageKind' in 'struct Eigen::internal::traits<const double>'
49 | Flags = cwise_promote_storage_order<typename traits<Lhs>::StorageKind,typename traits<Rhs>::StorageKind,_LhsNested::Flags & RowMajorBit,_RhsNested::Flags & RowMajorBit>::value
| ^~~~~
In file included from /nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/Core:166:
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/util/XprHelper.h: In instantiation of 'struct Eigen::internal::ref_selector<const double>':
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:99:60: required from 'class Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>'
99 | typedef typename internal::ref_selector<RhsType>::type RhsNested;
| ^~~~~~~~~
/build/source/unittest/cppad/basic.cpp:184:26: required from here
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/util/XprHelper.h:419:21: error: 'Flags' is not a member of 'Eigen::internal::traits<const double>'
419 | bool(traits<T>::Flags & NestByRefBit),
| ^~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/util/XprHelper.h:425:21: error: 'Flags' is not a member of 'Eigen::internal::traits<const double>'
425 | bool(traits<T>::Flags & NestByRefBit),
| ^~~~~
/build/source/unittest/cppad/basic.cpp: In member function 'void Test::test_eigen_min::test_method()':
/build/source/unittest/cppad/basic.cpp:184:37: error: no match for 'operator=' (operand types are 'Eigen::Matrix<CppAD::AD<double>, -1, 1>' and 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>')
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ^
/build/source/unittest/cppad/basic.cpp:184:37: note: there are 6 candidates
In file included from /nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/Core:296:
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:223:33: note: candidate 1: 'template<class OtherDerived> Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::DenseBase<OtherDerived>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
223 | EIGEN_STRONG_INLINE Matrix& operator=(const DenseBase<OtherDerived>& other)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:223:33: note: template argument deduction/substitution failed:
/build/source/unittest/cppad/basic.cpp:184:37: note: 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' is not derived from 'const Eigen::DenseBase<Derived>'
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ^
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:234:33: note: candidate 2: 'template<class OtherDerived> Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::EigenBase<OtherDerived>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
234 | EIGEN_STRONG_INLINE Matrix& operator=(const EigenBase<OtherDerived> &other)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:234:33: note: template argument deduction/substitution failed:
/build/source/unittest/cppad/basic.cpp:184:37: note: 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' is not derived from 'const Eigen::EigenBase<Derived>'
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ^
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:241:33: note: candidate 3: 'template<class OtherDerived> Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::ReturnByValue<OtherDerived>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
241 | EIGEN_STRONG_INLINE Matrix& operator=(const ReturnByValue<OtherDerived>& func)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:241:33: note: template argument deduction/substitution failed:
/build/source/unittest/cppad/basic.cpp:184:37: note: 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' is not derived from 'const Eigen::ReturnByValue<Derived>'
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ^
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:446:13: note: candidate 4: 'template<class OtherDerived> Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::RotationBase<OtherDerived, Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::ColsAtCompileTime>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
446 | Matrix& operator=(const RotationBase<OtherDerived,ColsAtCompileTime>& r);
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:446:13: note: template argument deduction/substitution failed:
/build/source/unittest/cppad/basic.cpp:184:37: note: 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' is not derived from 'const Eigen::RotationBase<OtherDerived, 1>'
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ^
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:206:33: note: candidate 5: 'Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
206 | EIGEN_STRONG_INLINE Matrix& operator=(const Matrix& other)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:206:57: note: no known conversion for argument 1 from 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' to 'const Eigen::Matrix<CppAD::AD<double>, -1, 1>&'
206 | EIGEN_STRONG_INLINE Matrix& operator=(const Matrix& other)
| ~~~~~~~~~~~~~~^~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:277:13: note: candidate 6: 'Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
277 | Matrix& operator=(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:277:32: note: no known conversion for argument 1 from 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' to 'Eigen::Matrix<CppAD::AD<double>, -1, 1>&&'
277 | Matrix& operator=(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)
| ~~~~~~~~~^~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h: In instantiation of 'class Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>':
/build/source/unittest/cppad/basic.cpp:211:26: required from here
211 | ad_Y = ad_X.array().max(Scalar(0.));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:77:7: error: no type named 'StorageKind' in 'struct Eigen::internal::traits<const double>'
77 | class CwiseBinaryOp :
| ^~~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:95:77: error: invalid use of incomplete type 'struct Eigen::internal::traits<double>'
95 | BinaryOp>::ret>::Base Base;
| ^~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:17:29: note: declaration of 'struct Eigen::internal::traits<double>'
17 | template<typename T> struct traits;
| ^~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h: In instantiation of 'struct Eigen::internal::traits<Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double> >':
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:96:5: required from 'class Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>'
96 | EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseBinaryOp)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/source/unittest/cppad/basic.cpp:211:26: required from here
211 | ad_Y = ad_X.array().max(Scalar(0.));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:38:28: error: 'const double' is not a class, struct, or union type
38 | >::type Scalar;
| ^~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:41:62: error: no type named 'StorageKind' in 'struct Eigen::internal::traits<const double>'
41 | BinaryOp>::ret StorageKind;
| ^~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:43:81: error: no type named 'StorageIndex' in 'struct Eigen::internal::traits<const double>'
43 | typename traits<Rhs>::StorageIndex>::type StorageIndex;
| ^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:45:32: error: 'const double' is not a class, struct, or union type
45 | typedef typename Rhs::Nested RhsNested;
| ^~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:47:54: error: 'const double' is not a class, struct, or union type
47 | typedef typename remove_reference<RhsNested>::type _RhsNested;
| ^~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:49:175: error: no type named 'StorageKind' in 'struct Eigen::internal::traits<const double>'
49 | Flags = cwise_promote_storage_order<typename traits<Lhs>::StorageKind,typename traits<Rhs>::StorageKind,_LhsNested::Flags & RowMajorBit,_RhsNested::Flags & RowMajorBit>::value
| ^~~~~
/build/source/unittest/cppad/basic.cpp: In member function 'void Test::test_eigen_max::test_method()':
/build/source/unittest/cppad/basic.cpp:211:37: error: no match for 'operator=' (operand types are 'Eigen::Matrix<CppAD::AD<double>, -1, 1>' and 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>')
211 | ad_Y = ad_X.array().max(Scalar(0.));
| ^
/build/source/unittest/cppad/basic.cpp:211:37: note: there are 6 candidates
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:223:33: note: candidate 1: 'template<class OtherDerived> Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::DenseBase<OtherDerived>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
223 | EIGEN_STRONG_INLINE Matrix& operator=(const DenseBase<OtherDerived>& other)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:223:33: note: template argument deduction/substitution failed:
/build/source/unittest/cppad/basic.cpp:211:37: note: 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' is not derived from 'const Eigen::DenseBase<Derived>'
211 | ad_Y = ad_X.array().max(Scalar(0.));
| ^
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:234:33: note: candidate 2: 'template<class OtherDerived> Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::EigenBase<OtherDerived>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
234 | EIGEN_STRONG_INLINE Matrix& operator=(const EigenBase<OtherDerived> &other)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:234:33: note: template argument deduction/substitution failed:
/build/source/unittest/cppad/basic.cpp:211:37: note: 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' is not derived from 'const Eigen::EigenBase<Derived>'
211 | ad_Y = ad_X.array().max(Scalar(0.));
| ^
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:241:33: note: candidate 3: 'template<class OtherDerived> Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::ReturnByValue<OtherDerived>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
241 | EIGEN_STRONG_INLINE Matrix& operator=(const ReturnByValue<OtherDerived>& func)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:241:33: note: template argument deduction/substitution failed:
/build/source/unittest/cppad/basic.cpp:211:37: note: 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' is not derived from 'const Eigen::ReturnByValue<Derived>'
211 | ad_Y = ad_X.array().max(Scalar(0.));
| ^
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:446:13: note: candidate 4: 'template<class OtherDerived> Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::RotationBase<OtherDerived, Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::ColsAtCompileTime>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
446 | Matrix& operator=(const RotationBase<OtherDerived,ColsAtCompileTime>& r);
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:446:13: note: template argument deduction/substitution failed:
/build/source/unittest/cppad/basic.cpp:211:37: note: 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' is not derived from 'const Eigen::RotationBase<OtherDerived, 1>'
211 | ad_Y = ad_X.array().max(Scalar(0.));
| ^
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:206:33: note: candidate 5: 'Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
206 | EIGEN_STRONG_INLINE Matrix& operator=(const Matrix& other)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:206:57: note: no known conversion for argument 1 from 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' to 'const Eigen::Matrix<CppAD::AD<double>, -1, 1>&'
206 | EIGEN_STRONG_INLINE Matrix& operator=(const Matrix& other)
| ~~~~~~~~~~~~~~^~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:277:13: note: candidate 6: 'Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&&) [with _Scalar = CppAD::AD<double>; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]'
277 | Matrix& operator=(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)
| ^~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/Matrix.h:277:32: note: no known conversion for argument 1 from 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<CppAD::AD<double>, CppAD::AD<double>, 0>, const Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >, const double>' to 'Eigen::Matrix<CppAD::AD<double>, -1, 1>&&'
277 | Matrix& operator=(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)
| ~~~~~~~~~^~~~~
In file included from /nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/Core/ArrayBase.h:96,
from /nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/Core:286:
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h: In instantiation of 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_min_op<typename Eigen::internal::traits<T>::Scalar, typename Eigen::internal::traits<T>::Scalar, 0>, const Derived, const OtherDerived> Eigen::ArrayBase<Derived>::min(const OtherDerived&) const [with OtherDerived = double; Derived = Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >; typename Eigen::internal::traits<T>::Scalar = CppAD::AD<double>]':
/build/source/unittest/cppad/basic.cpp:184:26: required from here
184 | ad_Y = ad_X.array().min(Scalar(0.));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h:56:30: error: could not convert '((const Eigen::ArrayBase<Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> > >*)this)->Eigen::ArrayBase<Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> > >::min<0>(CppAD::AD<double>((* & other)))' from 'CwiseBinaryOp<[...],[...],const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<CppAD::AD<double> >, Eigen::Array<CppAD::AD<double>, -1, 1, 0, -1, 1> >>' to 'CwiseBinaryOp<[...],[...],const double>'
56 | return (min<PropagateFast>)(other);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~
| |
| CwiseBinaryOp<[...],[...],const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<CppAD::AD<double> >, Eigen::Array<CppAD::AD<double>, -1, 1, 0, -1, 1> >>
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h: In instantiation of 'const Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<typename Eigen::internal::traits<T>::Scalar, typename Eigen::internal::traits<T>::Scalar, 0>, const Derived, const OtherDerived> Eigen::ArrayBase<Derived>::max(const OtherDerived&) const [with OtherDerived = double; Derived = Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> >; typename Eigen::internal::traits<T>::Scalar = CppAD::AD<double>]':
/build/source/unittest/cppad/basic.cpp:211:26: required from here
211 | ad_Y = ad_X.array().max(Scalar(0.));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nix/store/kki9hn7p0dc4186z31z5qz0kvaxmjk0s-eigen-3.4.1/include/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h:120:30: error: could not convert '((const Eigen::ArrayBase<Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> > >*)this)->Eigen::ArrayBase<Eigen::ArrayWrapper<Eigen::Matrix<CppAD::AD<double>, -1, 1> > >::max<0>(CppAD::AD<double>((* & other)))' from 'CwiseBinaryOp<[...],[...],const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<CppAD::AD<double> >, Eigen::Array<CppAD::AD<double>, -1, 1, 0, -1, 1> >>' to 'CwiseBinaryOp<[...],[...],const double>'
120 | return (max<PropagateFast>)(other);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~
| |
| CwiseBinaryOp<[...],[...],const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<CppAD::AD<double> >, Eigen::Array<CppAD::AD<double>, -1, 1, 0, -1, 1> >>
```
Contributor
There was a problem hiding this comment.
👋 Hi,
This is a reminder message to assign an extra build label to this Pull Request if needed.
By default, this PR will be build with minimal build options (URDF support and Python bindings)
The possible extra labels are:
- build_collision (build Pinocchio with coal support)
- build_casadi (build Pinocchio with CasADi support)
- build_autodiff (build Pinocchio with CppAD support)
- build_codegen (build Pinocchio with CppADCodeGen support)
- build_extra (build Pinocchio with extra algorithms)
- build_mpfr (build Pinocchio with Boost.Multiprecision support)
- build_sdf (build Pinocchio with SDF parser)
- build_accelerate (build Pinocchio with APPLE Accelerate framework support)
- build_all (build Pinocchio with ALL the options stated above)
Thanks.
The Pinocchio development team.
Contributor
|
Hello @nim65s, How did you get this error ? What cppad version/compiler/etc... ? |
Contributor
Author
|
x86_64 linux
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: