pboettch / json-schema-validator

JSON schema validator for JSON for Modern C++
Other
466 stars 134 forks source link

Library fails to compile in gcc-13 #320

Closed jtd-formlabs closed 2 weeks ago

jtd-formlabs commented 2 weeks ago
/.../vendor/.cache/json-schema-validator/70eb1607d55f60d71c9d92a457ee0a791cec2205/src/json-validator.cpp: In constructor '{anonymous}::type_schema::type_schema(nlohmann::json_abi_v3_11_2::json&, nlohmann::json_schema::root_schema*, const std::vector<nlohmann::json_uri>&)':
/.../vendor/.cache/json-schema-validator/70eb1607d55f60d71c9d92a457ee0a791cec2205/src/json-validator.cpp:606:61: error: no match for 'operator==' (operand types are 'const std::__cxx11::basic_string<char>' and 'nlohmann::json_abi_v3_11_2::basic_json<>')
  606 |                                                 if (t.first == schema_type)
      |                                                     ~~~~~~~ ^~ ~~~~~~~~~~~
      |                                                       |        |
      |                                                       |        nlohmann::json_abi_v3_11_2::basic_json<>
      |                                                       const std::__cxx11::basic_string<char>

Attempted to compile with gcc 13 and got this error. seems its unwilling to convert the arguments into one another implicitly. Compiling against c++20. Unsure if an issue with nlohmann::json or this library :)

jtd-formlabs commented 2 weeks ago

issue is fixed on master, closing