Revert "💥 changed iterators to andom_access_iterator #593"

This reverts commit c77a0be5f3.
This commit is contained in:
Niels Lohmann
2017-08-20 20:44:44 +02:00
parent 8acaf5bdbc
commit 64ef100ebf
3 changed files with 138 additions and 68 deletions

View File

@@ -240,8 +240,9 @@ TEST_CASE("algorithms")
SECTION("sorting an object")
{
json j({{"one", 1}, {"two", 2}});
std::sort(j.begin(), j.end());
CHECK(j == json({{"one", 1}, {"two", 2}}));
CHECK_THROWS_AS(std::sort(j.begin(), j.end()), json::invalid_iterator&);
CHECK_THROWS_WITH(std::sort(j.begin(), j.end()),
"[json.exception.invalid_iterator.209] cannot use offsets with object iterators");
}
}