Skip to content

VTK json clashes with local json #232

@davidscn

Description

@davidscn

Observed in the most recent vtk 9.4.1:

It seems that VTK now includes the same json as we do (nlohmann::json). However, vtk puts the json into their own namespace.
This leads to errors of the form

error: ‘vtknlohmann’ does not name a type; did you mean ‘nlohmann’?
   82 |   nlohmann::json SerializeValues();
      |   ^~~~~~~~
src/configreader.hpp:16:14: error: ‘vtknlohmann’ does not name a type; did you mean ‘nlohmann’?
   16 | using json = nlohmann::json;

My guess would be that the compiler then only includes one of the two json files. Requires some investigation. I didn't face this issue in VTK version 9.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions