vtkLogging static cast error

@utkarshayachit I’m seeing this casting error:

Common/Core/vtkLogger.cxx: In static member function ‘static vtkLogger* vtkLogger::New()’:
Common/Core/vtkObjectFactory.h:339:39: error: invalid static_cast from type ‘vtkObject*’ to type ‘vtkLogger*’
     return static_cast<thisClass*>(ret); \
                                       ^
Common/Core/vtkObjectFactory.h:360:3: note: in expansion of macro ‘VTK_OBJECT_FACTORY_NEW_BODY’
   VTK_OBJECT_FACTORY_NEW_BODY(thisClass)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Common/Core/vtkObjectFactory.h:372:3: note: in expansion of macro ‘VTK_STANDARD_NEW_BODY’
   VTK_STANDARD_NEW_BODY(thisClass) \
   ^~~~~~~~~~~~~~~~~~~~~
Common/Core/vtkLogger.cxx:68:1: note: in expansion of macro ‘vtkStandardNewMacro’
 vtkStandardNewMacro(vtkLogger);
 ^~~~~~~~~~~~~~~~~~~

Regards
Andrew

Here’s a fix: https://gitlab.kitware.com/vtk/vtk/merge_requests/5160

Thanks, @utkarshayachit the fix works.

thanks for the quick verification!

@utkarshayachit … spoke too soon! I just did a Windows build now and you need to add:

#include <string>

to vtkLogger.h, maybe around line 158. Subtle compiler differences again!

fixed here: https://gitlab.kitware.com/vtk/vtk/merge_requests/5163

Thanks