1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

fixed compile error for #1045; to_json for iternation_proxy_internal was needed

This commit is contained in:
Danielc
2018-06-16 12:01:49 +03:00
parent 8d8f890771
commit 1566ad4053
3 changed files with 29 additions and 5 deletions

View File

@ -1631,9 +1631,10 @@ TEST_CASE("regression tests")
p2.begin(), p2.end(),
std::inserter(diffs, diffs.end()), [&](const it_type & e1, const it_type & e2) -> bool
{
return (e1.key() < e2.key()) and (e1.value() < e2.value());
using comper_pair = std::pair<std::string, decltype(e1.value())>; // Trying to avoid unneeded copy
return comper_pair(e1.key(), e1.value()) < comper_pair(e2.key(), e2.value()); // Using pair comper
});
CHECK(diffs.size() == 2);
CHECK(diffs.size() == 1); // Note the change here, was 2
}
}