Skip to content

Commit

Permalink
Added fix for nlohmann#3007 to update(const_iterator, const_iterator)…
Browse files Browse the repository at this point in the history
… as well.
  • Loading branch information
AnthonyVH committed Sep 10, 2021
1 parent 40b07f2 commit 0989a3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6072,6 +6072,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
for (auto it = first; it != last; ++it)
{
m_value.object->operator[](it.key()) = it.value();
#if JSON_DIAGNOSTICS
m_value.object->operator[](it.key()).m_parent = this;
#endif
}
}

Expand Down
3 changes: 3 additions & 0 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23477,6 +23477,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
for (auto it = first; it != last; ++it)
{
m_value.object->operator[](it.key()) = it.value();
#if JSON_DIAGNOSTICS
m_value.object->operator[](it.key()).m_parent = this;
#endif
}
}

Expand Down

0 comments on commit 0989a3c

Please sign in to comment.