作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
下面的代码好像有问题。我收到错误消息
error: expected unqualified-id before numeric constant
Eigen::Matrix M_inv1_abc = pose_l.block<3, 3>(0, 0).inverse(); This is a code sample:
template<typename T>
Eigen::Matrix<T, 4, 1> Function(Eigen::Matrix<T, 3, 4> pose_l)
{
// fails here
Eigen::Matrix<T, 3, 3> M_inv1 = pose_l.block<3, 3>(0, 0).inverse();
// this works, sample is from https://eigen.tuxfamily.org/dox/group__TutorialMatrixClass.html
Eigen::MatrixXf m(4,4);
Eigen::MatrixXf y(2,2);
m << 1, 2, 3, 4,
5, 6, 7, 8,
9,10,11,12,
13,14,15,16;
y = m.block<2,2>(1,1);
}
对于示例 MatrixXf,我不使用我的模板...
我重命名了pose_l和M_inv1;在其他帖子中,例如 Expected unqualified-id before numeric constant for defining a number重新定义有所帮助,但对我而言不是。
我错过了什么?
最佳马努克劳斯
最佳答案
pose_l.template block<3, 3>(0, 0).inverse();
具体可以引用c++如何推导变量类型
关于c++ - 具有特征类的不合格 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41743850/
我是 DDD 的新手,正在考虑在我的项目中使用这种设计技术。 然而,让我对 DDD 印象深刻的是这个想法是多么的基本。与 MVC 和 TDD 等其他设计技术不同,它似乎不包含任何突破性的想法。 例如,
我正在尝试理解 elementFormDefault="qualified/unqualified" 的含义在嵌入 WSDL(SOAP 1.1、WSDL 1)的 XML 模式中。 例如,我在 WSDL
我有一段代码,它使用 iostreams 的 xalloc 和 pword 将各种类型的标志存储为指针。由于 pword 公开了一个 void*&,我有一个简单的包装器来通过旧的 C 转换公开存储的类
我是一名优秀的程序员,十分优秀!