以下简化代码:
#include "Eigen/Core"
template <int n>
Eigen::Matrix<float, 1, n> init_array(float a)
{
Eigen::Matrix<float, 1, n> res;
res.fill(a);
return res;
}
int main()
{
Eigen::Matrix<float, 1, 3> a = init_array<3>(1.0f);
}
导致 Visual Studio 崩溃:
main.cpp(13): fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'msc1.cpp', line 1325)
To work around this problem, try simplifying or changing the program near the locations listed above.
我下载了最新版本的Eigen 3.2.5。 我有 Visual Studio Professional 2013 版本 12.0.21005.1。
有人知道解决方法吗?
最佳答案
我遇到了同样的问题。显然,您应该更新 Visual Studio 2013。这对我有用。 这个问题was reported to Microsoft他们在更新 2 中修复了它(当前是 5)
关于c++ - 尝试编译 Eigen 时 Visual Studio 2013 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31024371/