-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
confirmedkind: bugsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Milestone
Description
Description
I have a use-case where I iterate over collections in a generic manner (using templates). However, iteration over basic_json fails due to the statement:
JSON_ASSERT(m_object != nullptr);
Before asserting for non-null object, shouldn't we first check of other.m_object
is null too? If both are null, the operator should return true before the assertion.
Reproduction steps
nlohmann::json::iterator{} == nlohmann::json::iterator{}
Expected vs. actual results
Expected: Should return true of m_object is nullptr for both objects
Actual: Assertion fails
Minimal code example
No response
Error messages
No response
Compiler and operating system
gcc 9.3
Library version
3.11.3
Validation
- The bug also occurs if the latest version from the
develop
branch is used. - I can successfully compile and run the unit tests.
Metadata
Metadata
Assignees
Labels
confirmedkind: bugsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation