以下简化代码:
#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。
有人知道解决方法吗?
答案 0 :(得分:0)
我遇到了同样的问题。显然,您应该更新Visual Studio 2013.这对我有用。 这个问题was reported to Microsoft并且他们在更新2中修复了它(当前是5)