1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-13 20:21:48 +03:00

Merge branch 'develop' into feature/undo-number-roundtrip

This commit is contained in:
Niels
2016-06-23 05:57:41 +02:00
6 changed files with 168 additions and 59 deletions

View File

@ -9158,9 +9158,12 @@ class basic_json
// in a second pass, traverse the remaining elements
// remove my remaining elements
const auto end_index = static_cast<difference_type>(result.size());
while (i < source.size())
{
result.push_back(object(
// add operations in reverse order to avoid invalid
// indices
result.insert(result.begin() + end_index, object(
{
{"op", "remove"},
{"path", path + "/" + std::to_string(i)}