Unable to iterate json: "ambiguous overload for operator!=" #4212
-
I am failing to compile when attempting to iterate a json object. Code: I tried both the range-based for example and the stl-iter example from the README's "STL-like access" section: both attempts gave the same compiler error. I'll post the full output in a response, but here is the error itself: OS is RHEL 8.7, compiler GCC 8.5.0, C++17 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Full output, including compile args: Error processing Command: |
Beta Was this translation helpful? Give feedback.
-
Arrg: I spend days searching for an answer before giving up and asking here. Within an hour of posting, I found the problem and a solution: elsewhere in my codebase, I found Removing these statements and replacing them with boost/operators.hpp in the affected class fixed my compile errors. |
Beta Was this translation helpful? Give feedback.
Arrg: I spend days searching for an answer before giving up and asking here. Within an hour of posting, I found the problem and a solution: elsewhere in my codebase, I found
using std::rel_ops::operator!=; std::rel_ops::operator>; std::rel_ops::operator<=; std::rel_ops::operator>=;
Removing these statements and replacing them with boost/operators.hpp in the affected class fixed my compile errors.