1#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H
3#ifndef SIMDJSON_CONDITIONAL_INCLUDE
4#define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H
6#include "simdjson/generic/implementation_simdjson_result_base.h"
7#include "simdjson/generic/ondemand/base.h"
8#include "simdjson/generic/ondemand/value_iterator.h"
13namespace SIMDJSON_IMPLEMENTATION {
26 using iterator_category = std::input_iterator_tag;
28 using difference_type = std::ptrdiff_t;
53 simdjson_inline
bool operator==(const
array_iterator &) const noexcept;
61 simdjson_inline
bool operator!=(const
array_iterator &) const noexcept;
72 simdjson_warn_unused simdjson_inline
bool at_end() const noexcept;
75#if SIMDJSON_DEVELOPMENT_CHECKS
76 bool has_been_referenced{
false};
78 value_iterator iter{};
80 simdjson_inline
array_iterator(
const value_iterator &iter)
noexcept;
94struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> :
public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> {
95 using iterator_category = std::input_iterator_tag;
96 using value_type = simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>;
97 using difference_type = std::ptrdiff_t;
99 using reference = value_type;
101 simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::array_iterator &&value)
noexcept;
103 simdjson_inline simdjson_result() noexcept = default;
109 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator*() noexcept;
110 simdjson_inline
bool operator==(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &) const noexcept;
111 simdjson_inline
bool operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &) const noexcept;
112 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &operator++() noexcept;
114 simdjson_warn_unused simdjson_inline
bool at_end() const noexcept;
A forward-only JSON array.
simdjson_inline array_iterator() noexcept=default
Create a new, invalid array iterator.
simdjson_warn_unused simdjson_inline bool at_end() const noexcept
Check if the array is at the end.
An ephemeral JSON value returned during iteration.
The top level simdjson namespace, containing everything the library provides.
error_code
All possible errors returned by simdjson.
The result of a simdjson operation that could fail.
simdjson_inline error_code error() const noexcept
The error.