diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index a49299cbb..192f42f07 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -52,8 +52,9 @@ struct traits > : svd_traits template struct allocate_small_svd { - static void run(JacobiSVD& smallSvd, Index rows, Index cols, unsigned int) { - internal::construct_at(&smallSvd, rows, cols); + static void run(JacobiSVD& smallSvd, Index rows, Index cols, unsigned int computationOptions) { + (void)computationOptions; + smallSvd = JacobiSVD(rows, cols); } }; @@ -63,7 +64,7 @@ EIGEN_DISABLE_DEPRECATED_WARNING template struct allocate_small_svd { static void run(JacobiSVD& smallSvd, Index rows, Index cols, unsigned int computationOptions) { - internal::construct_at(&smallSvd, rows, cols, computationOptions); + smallSvd = JacobiSVD(rows, cols, computationOptions); } }; diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 84934db8d..615aad149 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -553,8 +553,7 @@ class JacobiSVD : public SVDBase > { * \deprecated Will be removed in the next major Eigen version. Options should * be specified in the \a Options template parameter. */ - // EIGEN_DEPRECATED // this constructor is used to allocate memory in BDCSVD - JacobiSVD(Index rows, Index cols, unsigned int computationOptions) { + EIGEN_DEPRECATED JacobiSVD(Index rows, Index cols, unsigned int computationOptions) { internal::check_svd_options_assertions(computationOptions, rows, cols); allocate(rows, cols, computationOptions); }