[vtkusers] VTK8.2RC2: vtkMath.h misses #include <algorithm> for C++17

lp lotterluke at gmail.com
Fri Jan 11 13:03:28 EST 2019


Hi all,

In VTK8.2 the function vtkMath::ClampValue in vtkMath.h uses the standard
library function std::clamp, if a C++17 compiler is found. But the include
that contains std::clamp (<algorithm>) is not listed in vtkMath.h.
This leads to a compile error, when using VTK8.2RC2 in a project that is
compiled with C++17.

>From my understanding this could be fixed by adding

#include <algorithm>

at the beginning of vtkMath.h inside an #if statement that checks for C++17.

Regards,
Lukas



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list