Override n + iterator operator in the iterator
This commit is contained in:
1 parent
52adf3fd5b
commit
ed62129f8e
2 files changed
+33
-2
No files matched your search
@@ -269,6 +269,16 @@ TEST_CASE("iterators 2")
|
||||
CHECK_THROWS_AS(it + 1, json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(it + 1, "[json.exception.invalid_iterator.209] cannot use offsets with object iterators");
|
||||
}
|
||||
{
|
||||
auto it = j_object.begin();
|
||||
CHECK_THROWS_AS(1 + it, json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(1 + it, "[json.exception.invalid_iterator.209] cannot use offsets with object iterators");
|
||||
}
|
||||
{
|
||||
auto it = j_object.cbegin();
|
||||
CHECK_THROWS_AS(1 + it, json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(1 + it, "[json.exception.invalid_iterator.209] cannot use offsets with object iterators");
|
||||
}
|
||||
{
|
||||
auto it = j_object.begin();
|
||||
CHECK_THROWS_AS(it -= 1, json::invalid_iterator);
|
||||
@@ -688,6 +698,16 @@ TEST_CASE("iterators 2")
|
||||
CHECK_THROWS_AS(it + 1, json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(it + 1, "[json.exception.invalid_iterator.209] cannot use offsets with object iterators");
|
||||
}
|
||||
{
|
||||
auto it = j_object.rbegin();
|
||||
CHECK_THROWS_AS(1 + it, json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(1 + it, "[json.exception.invalid_iterator.209] cannot use offsets with object iterators");
|
||||
}
|
||||
{
|
||||
auto it = j_object.crbegin();
|
||||
CHECK_THROWS_AS(1 + it, json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(1 + it, "[json.exception.invalid_iterator.209] cannot use offsets with object iterators");
|
||||
}
|
||||
{
|
||||
auto it = j_object.rbegin();
|
||||
CHECK_THROWS_AS(it -= 1, json::invalid_iterator);
|
||||
|
||||
Reference in new issue
Block a user