From 46292b8d4b6d70fb4419aa8ab566051fd15457e8 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 5 Oct 2022 08:50:52 -0400 Subject: [PATCH] Update basics.md --- doc/basics.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/basics.md b/doc/basics.md index 4266bab70..6a9ef33cd 100644 --- a/doc/basics.md +++ b/doc/basics.md @@ -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: