Eigen: update to 3.3.10 (or 3.4.0) to resolve /std:c++latest issues on MSVC
Environment: Windows Server 2016 + VS2019 VTK master branch 1e68dae3 commit.
When we update the commit to 1e68dae3 and execute our automation script. VTK failed due to the following error under /std:c++latest mode. Could you please help take a look at this? Thanks in advance!
Steps to reproduce the behavior:
- git clone https://gitlab.kitware.com/vtk/vtk.git F:\gitP\vtk\vtk
- Open a VS 2019 x64 command prompt and browse to F:\gitP\vtk\vtk
- mkdir build_x64 && pushd build_x64
- cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DBUILD_SHARED_LIBS=OFF -DVTK_BUILD_TESTING=WANT -DVTK_BUILD_EXAMPLES=OFF -DVTK_IGNORE_CMAKE_CXX11_CHECKS=TRUE ..
- set _CL_=-std:c++latest
- msbuild /m /p:Platform=x64 /p:Configuration=Release All_BUILD.vcxproj /t:Rebuild
error message:
vtkPCAStatistics.cxx
F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(355,1): **error C2446: '!=': no conversion from 'double' to 'vtkeigen::ArrayWrapper<Derived>'**
with
[
Derived=vtkeigen::Block<vtkeigen::Block<vtkeigen::Block<vtkeigen::Matrix<double,-1,-1,0,-1,-1>,-1,-1,false>,-1,1,true>,-1,1,false>
]
F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(355,1): note: No constructor could take the source type, or constructor overload resolution was ambiguous
F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(341): note: while compiling class template member function 'void vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>::structured_update(vtkeigen::Block<Derived,-1,-1,false>,const vtkeigen::Matrix<double,-1,-1,0,-1,-1> &,vtkeigen::SVDBase<vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>>::Index)'
with
[
Derived=vtkeigen::Matrix<double,-1,-1,0,-1,-1>
]
F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(542): note: see reference to function template instantiation 'void vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>::structured_update(vtkeigen::Block<Derived,-1,-1,false>,const vtkeigen::Matrix<double,-1,-1,0,-1,-1> &,vtkeigen::SVDBase<vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>>::Index)' being compiled
with
[
Derived=vtkeigen::Matrix<double,-1,-1,0,-1,-1>
]
F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(216): note: while compiling class template member function 'void vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>::allocate(vtkeigen::SVDBase<vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>>::Index,vtkeigen::SVDBase<vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>>::Index,unsigned int)'
F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(243): note: see reference to function template instantiation 'void vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>::allocate(vtkeigen::SVDBase<vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>>::Index,vtkeigen::SVDBase<vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>>::Index,unsigned int)' being compiled
F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(239): note: while compiling class template member function 'vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>> &vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>::compute(const vtkeigen::Matrix<double,-1,-1,0,-1,-1> &,unsigned int)'
F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(137): note: see reference to function template instantiation 'vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>> &vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>::compute(const vtkeigen::Matrix<double,-1,-1,0,-1,-1> &,unsigned int)' being compiled
F:\gitP\vtk\vtk\Filters\Statistics\vtkPCAStatistics.cxx(664): note: see reference to class template instantiation 'vtkeigen::BDCSVD<vtkeigen::Matrix<double,-1,-1,0,-1,-1>>' being compiled
**F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(361,1): error C2446: '!=': no conversion from 'double' to 'vtkeigen::ArrayWrapper<Derived>'**
with
[
Derived=vtkeigen::Block<vtkeigen::Block<vtkeigen::Block<vtkeigen::Matrix<double,-1,-1,0,-1,-1>,-1,-1,false>,-1,1,true>,-1,1,false>
]
F:\gitP\vtk\vtk\ThirdParty\eigen\vtkeigen\eigen\src/SVD/BDCSVD.h(361,1): note: No constructor could take the source type, or constructor overload resolution was ambiguous
Edited by Ben Boeckel