We have some C++ software that was compiling fine against ITK 5.2.1. In an effort to get up to date I am trying to compile against ITK 5.3.0 using Visual Studio 17 2022. I am getting the following compile error.
FAILED: complex/Plugins/ITKImageProcessing/CMakeFiles/ITKImageProcessing.dir/Debug/src/ITKImageProcessing/Filters/ITKMorphologicalWatershedImage.cpp.obj
C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe /nologo /TP -DCOMPLEX_ENABLE_MULTICORE -DEbsdLib_BUILT_AS_DYNAMIC_LIB -DFMT_SHARED -DH5Support_USE_MUTEX -DH5_BUILT_AS_DYNAMIC_LIB -DH5_USE_110_API -DITKImageProcessing_EXPORTS -DTBB_USE_DEBUG -D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING -DCMAKE_INTDIR=\"Debug\" -IE:\Workspace1\complex\src\Plugins\ITKImageProcessing\src -IE:\Workspace1\DREAM3D-Build\NX-ninja-v143\complex\Plugins\ITKImageProcessing\generated -IE:\Workspace1\complex\src -IE:\Workspace1\DREAM3D-Build\NX-ninja-v143\complex\generated -external:IE:\Workspace1\vcpkg-installed-v143\x64-windows\include -external:IE:\Workspace1\vcpkg-installed-v143\x64-windows\share\eigen3\..\..\include\eigen3 -external:IE:\Workspace1\vcpkg-installed-v143\x64-windows\include\ITK-5.3 -external:W0 /DWIN32 /D_WINDOWS /EHsc /Ob0 /Od /RTC1 -std:c++17 -MDd -Zi /wd4275 /wd4251 /we4706 /we4715 /we4456 /we4457 /we4458 /we4459 /permissive- /MP /bigobj /showIncludes /Focomplex\Plugins\ITKImageProcessing\CMakeFiles\ITKImageProcessing.dir\Debug\src\ITKImageProcessing\Filters\ITKMorphologicalWatershedImage.cpp.obj /Fdcomplex\Plugins\ITKImageProcessing\CMakeFiles\ITKImageProcessing.dir\Debug\ /FS -c E:\Workspace1\complex\src\Plugins\ITKImageProcessing\src\ITKImageProcessing\Filters\ITKMorphologicalWatershedImage.cpp
E:\Workspace1\vcpkg-installed-v143\x64-windows\include\ITK-5.3\itkShapedNeighborhoodIterator.h(182): error C2516: 'itk::ShapedNeighborhoodIterator<TImage,TBoundaryCondition>::ConstIterator': is not a legal base class
E:\Workspace1\vcpkg-installed-v143\x64-windows\include\ITK-5.3\itkShapedNeighborhoodIterator.h(171): note: see declaration of 'itk::ShapedNeighborhoodIterator<TImage,TBoundaryCondition>::ConstIterator'
E:\Workspace1\vcpkg-installed-v143\x64-windows\include\ITK-5.3\itkShapedNeighborhoodIterator.h(182): note: the template instantiation context (the oldest one first) is
E:\Workspace1\vcpkg-installed-v143\x64-windows\include\ITK-5.3\itkShapedNeighborhoodIterator.h(265): note: see reference to class template instantiation 'itk::ShapedNeighborhoodIterator<TImage,TBoundaryCondition>' being compiled
E:\Workspace1\vcpkg-installed-v143\x64-windows\include\ITK-5.3\itkShapedNeighborhoodIterator.h(209): note: see reference to class template instantiation 'itk::ShapedNeighborhoodIterator<TImage,TBoundaryCondition>::Iterator' being compiled
Has anyone seen anything like this by rare chance? I looked at the ITK code and it all looks legit but the Visual Studio compilers do not like something about it. Clang on macOS didn’t seem to have an issue.