diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 52a883811..29a95b8db 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -501,8 +501,12 @@ template class DenseBase * Notice that in the case of a plain matrix or vector (not an expression) this function just returns * a const reference, in order to avoid a useless copy. */ - EIGEN_STRONG_INLINE const typename ei_eval::type eval() const - { return typename ei_eval::type(derived()); } + inline const typename ei_eval::type eval() const + { + // MSVC cannot honor strong inlining when the return type + // is a dynamic matrix + return typename ei_eval::type(derived()); + } template void swap(DenseBase EIGEN_REF_TO_TEMPORARY other);