Open tomalakgeretkal opened 10 months ago
patch_inplace has several instances of get<std::string>, which breaks the build if you're using a custom string.
patch_inplace
get<std::string>
Compilation fails.
struct MyString; // some compatible impl using Value = nlohmann::basic_json< std::map, std::vector, MyString, bool, std::int64_t, std::uint64_t, double, std::allocator, nlohmann::adl_serializer, std::vector<std::uint8_t> >; Value base, patch; base.patch(patch);
No matching constructor for initialization of 'nlohmann::basic_json<std::map, std::vector, MyString >::json_pointer' (aka 'json_pointer< MyString >')
Apple clang version 14.0.3 (clang-1403.0.22.14.1), macOS Ventura 13.5.1
3.11.2
develop
Seems easy enough to fix. If you care to submit a PR, please add a regression test to tests/src/unit-alt-string.cpp.
tests/src/unit-alt-string.cpp
Description
patch_inplace
has several instances ofget<std::string>
, which breaks the build if you're using a custom string.Reproduction steps
Expected vs. actual results
Compilation fails.
Minimal code example
Error messages
Compiler and operating system
Apple clang version 14.0.3 (clang-1403.0.22.14.1), macOS Ventura 13.5.1
Library version
3.11.2
Validation
develop
branch is used.