dot product with single column block fails with new static checks
@rmlarsen1
Submitted by Rasmus Munk LarsenAssigned to Nobody
Link to original bugzilla bug (#1664)
Version: 3.4 (development)
Description
The recent changes to static checking causes the following code
Eigen::Vector4f pl_t;
Eigen::Vector3f fp_c;
...
pl_f (3) = -fp_c.dot (pl_f.block (0, 0, 3, 1));
to fail with
./third_party/eigen3/Eigen/src/Core/Dot.h:75:3: error: static_assert failed due to requirement 'Block<Eigen::Matrix<float, 4, 1, 0, 4, 1>, -1, -1, false>::IsVectorAtCompileTime' "YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX"
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./third_party/eigen3/Eigen/src/Core/util/StaticAssert.h:142:3: note: expanded from macro 'EIGEN_STATIC_ASSERT_VECTOR_ONLY'
EIGEN_STATIC_ASSERT(TYPE::IsVectorAtCompileTime, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./third_party/eigen3/Eigen/src/Core/util/StaticAssert.h:33:40: note: expanded from macro 'EIGEN_STATIC_ASSERT'
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^ ~
third_party/pcl/filters/include/pcl/filters/impl/frustum_culling.hpp:113:20: note: in instantiation of function template specialization 'Eigen::MatrixBase<Eigen::Matrix<float, 3, 1, 0, 3, 1> >::dot<Eigen::Block<Eigen::Matrix<float, 4, 1, 0, 4, 1>, -1, -1, false> >' requested here
pl_f (3) = -fp_c.dot (pl_f.block (0, 0, 3, 1)); // perpendicular edges of the far plane