Closed mark-99 closed 1 year ago
/c++20 is the same, so it's not just C++23 mode.
It seems that in the new version, operator== and operator!= has been deprecated . Please use teh latest version and try again. vcpkg has updated the version. :)
https://github.com/nlohmann/json/releases/tag/v3.11.2#:~:text=%F0%9F%94%A5,.%20%233684
This isn't fixed, I already have latest and have pulled again today (2023-05-30), the failing build is already at v3.11.2
C:\Temp\MdpCpp\out\build\x64-debug-clang\vcpkg_installed\x64-windows-cpp20\include\nlohmann/json.hpp(162): note: see declaration of 'nlohmann::json_abi_v3_11_2::json_pointer<StringType>'
Note json_abi_v3_11_2
It's not clear if nlohmann-json
is failing independently or only as a dependency when building json-schema-validator
. I'd strongly suspect the latter given nlohmann is widely used but json-schema-validator is more niche. It looks like json-schema-validator is using the deprecated functionality, on the operator==
here (json-validator.cpp:606):
case json::value_t::array: // "type": ["type1", "type2"]
for (auto &schema_type : attr.value())
for (auto &t : schema_types)
if (t.first == schema_type)
type_[static_cast<uint8_t>(t.second)] = type_schema::make(sch, t.second, root, uris, known_keywords);
break;
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
Same issue for me. It works fine when installing json-schema-validator standalone without vcpkg (still using vcpkg for nlohmann_json)
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
There's a workaround according to https://github.com/nlohmann/json/issues/3868#issuecomment-1563726354
by adding following to the overlay-triplet:
if(${PORT} MATCHES "json-schema-validator")
set(VCPKG_CXX_FLAGS ${VCPKG_CXX_FLAGS} "-DJSON_HAS_THREE_WAY_COMPARISON=0")
endif()
Operating system
Windows
Compiler
MSVC /c++:latest
Steps to reproduce the behavior
Failure logs
Additional context
No response