MSVC 2013 produces errors with the following code: -------------------------- #include <Eigen/Sparse> using namespace Eigen; int main() { SparseMatrix<double> m; SparseLU<decltype(m)> lu; lu.compute(m); } -------------------------- Errors occur where this expression "Traits::template match<Derived>::MatchAtCompileTime" appears in src/Core/Ref.h. The errors go away when that expression is replaced by "Traits::match<Derived>::MatchAtCompileTime". I'm not sure if MSVC is violating the Standard, but I'd appreciate greatly if this issue is taken care of in the Eigen codebase. Best, Kenshi
MSVC is indeed violating the standard here, and removing the template keyword makes all other compilers fail to compile. Have you installed all updates? Could someone else confirm this issue?
Can we hide the enable_if construct somehow in an internal function (cf Bug 903), or couldn't we actually use a static assert here?
Hopefully this is enough to workaround MSVC weirdness. Feel free to reopen if that's still broken. https://bitbucket.org/eigen/eigen/commits/06d4fff20a93/ Changeset: 06d4fff20a93 User: ggael Date: 2014-11-05 15:15:17+00:00 Summary: Big 853: replace enable_if in Ref<> ctor by static assertions and add failtests for Ref<>
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/853.