Ambiguous conversion from nlohmann::basic_json<> to custom class. #3333
Labels
kind: bug
release item: 🐛 bug fix
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Milestone
Compile time error occurs if I try to convert instance of
nlohmann::basic_json<>
to instance of class which has converting constructor with template specialization fornlohmann::basic_json<>
. This regression is present in v3.10.4, v3.10.5 and develop (d8a6329).Code example, which expose this issue -
nlohmann-json-issue.cpp
:Compile error:
Workarounds:
-DJSON_USE_IMPLICIT_CONVERSIONS=0
;pointJson
mutable;Compiler: g++ (GCC) 11.1.0
OS: Arch Linux
The text was updated successfully, but these errors were encountered: