I’m seeing a compile error with vs2017, which is still a supported compiler according to the VTK build instructions:
vtkTableBasedClipCases.cxx
Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\CL.exe.
The error doesn’t give much useful information, but I’ve tracked down the problem to the large arrays in the vtkTableBasedClipCases.h header file, e.g.:
static constexpr uint8_t CellCases[] = {
<26665 elements>
};
It seems that, for vs2017, this array is just too large to be constexpr
and basically crashes the compiler. As a test, I reduced the size to just a few hundred elements (and similarly reduced other arrays in this header), and the compilation worked just fine.
Would it be reasonable to put the few really huge arrays into the .cxx file, instead of keeping them in the .h file? It would be easier on the compiler, and probably wouldn’t impact performance much.
Edit: it’s probably just two arrays that would have to be moved: CellCases[26665]
and CellCasesInsideOut[23879]
.
Edit 2: I’ve confirmed that vs2017 builds after these arrays are moved to the .cxx and declared “const” instead of “constexpr”.