vtk 9.6.2 msvc2022 C++20 using issue

Hello,

I am continue migration to 9.6.2 and now I have issue building my project with vtk with c++20 (no issue for c++17).

I got error

Error C7595 ‘vtkfmt::v12::fstring<bool &,bool &,const bool &>::fstring’: call to immediate function is not a constant expression vtk-9.6\vtkTimerLog.h 119

it is here

VTK_FORMAT_IF_ERROR_RETURN(
  auto result = vtk::format_to_n(event, sizeof(event), format, std::forward<T>(args)...);
  *result.out = '\0', );

changing here to

VTK_FORMAT_IF_ERROR_RETURN(
  auto result = vtk::format_to_n(event, sizeof(event), fmt::runtime(format), std::forward<T>(args)...);
  *result.out = '\0', );

solve issue. But I am not sure is it good. Or probably it could be patched in future.

I will be happy for some advices for this issue.

Andrey

Hello,

Please, you could report that here: https://gitlab.kitware.com/vtk/vtk/-/work_items .

best,

PC

@APlenkin Based on your other recent comment you mentioned you were using the v142 toolset which is MSVC from Visual Studio 2019. Are you still using that or are you now using the v143 toolset for MSVC from Visual Studio 2022?

Hello, VTK were build with v142. Now I am building my project with this VTK in different configurations. Both v142 and v143 have issue then I choose to build with c++20 standart and both are fine with c++17.