diff --git a/src/json.hpp b/src/json.hpp index 84352ce9b..02d28613f 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -4972,7 +4972,7 @@ class basic_json /// defines a reference to the type iterated over (value_type) using reference = typename basic_json::const_reference; /// the category of the iterator - using iterator_category = std::random_access_iterator_tag; + using iterator_category = std::bidirectional_iterator_tag; /// default constructor const_iterator() = default; diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index f745c8751..ae4a41bb4 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -4972,7 +4972,7 @@ class basic_json /// defines a reference to the type iterated over (value_type) using reference = typename basic_json::const_reference; /// the category of the iterator - using iterator_category = std::random_access_iterator_tag; + using iterator_category = std::bidirectional_iterator_tag; /// default constructor const_iterator() = default;