Update basics.md

This commit is contained in:
Daniel Lemire
2022-10-05 08:50:52 -04:00
committed by GitHub
parent 46241287c6
commit 46292b8d4b
+2 -1
View File
@@ -1110,7 +1110,8 @@ for (auto val : doc) {
std::cout << doc.current_location() << std::endl; // Throws OUT_OF_BOUNDS
```
Conversely, if `doc.current_location()` succeeds, then the document has more content.
Conversely, if `doc.current_location().error() == simdjson::SUCCESS`,
then the document has more content.
Finally, the `current_location()` method may also be used even when no exceptions/errors
are thrown. This can be helpful for users that want to know the current state of iteration during parsing. For example: