IO/Legacy/vtkDataReader.cxx: int vtkDataReader::ReadString(char result) does not compile in C++20
We (Microsoft) are implementing c++20 library support in our standard library and have found that the referenced line: (https://gitlab.kitware.com/vtk/vtk/blob/v8.2.0/IO/Legacy/vtkDataReader.cxx#L291) does not compile with a C++20 compiler. The change that breaks things is P0487R1. Unfortinately VTK has the one non-bug usage of operator>>(stream, char*) that breaks under the new wording. As far as I can tell there are a few alternative fixes, but I don't know enough about the codebase to make a good decision on which to implement. I'd be happy to submit a patch implementing any of these once one has been decided on.
- change the function signature to
int vtkDataReader::ReadString(char (&result))
- change line 291 to something like
*this->IS >> reinterpret_cast<char (&)>(result)
Let me know thoughts on this, or if you have any better fixes.