10#include <userver/formats/yaml/types.hpp>
11#include <userver/utils/fast_pimpl.hpp>
13USERVER_NAMESPACE_BEGIN
15namespace formats::
yaml {
18template <
typename iter_traits>
21 using iterator_category = std::forward_iterator_tag;
22 using difference_type = std::ptrdiff_t;
23 using value_type =
typename iter_traits::value_type;
24 using reference =
typename iter_traits::reference;
25 using pointer =
typename iter_traits::pointer;
27 Iterator(
const typename iter_traits::native_iter& iter,
int index,
const formats::
yaml::
Path& path);
28 Iterator(
const Iterator& other);
29 Iterator(Iterator&& other)
noexcept;
30 Iterator& operator=(
const Iterator& other);
31 Iterator& operator=(Iterator&& other)
noexcept;
34 Iterator operator++(
int);
35 Iterator& operator++();
36 reference operator*()
const;
37 pointer operator->()
const;
39 bool operator==(
const Iterator& other)
const;
40 bool operator!=(
const Iterator& other)
const;
53 void UpdateValue()
const;
55 static constexpr std::size_t kNativeIterSize = 48;
56 static constexpr std::size_t kNativeIterAlignment =
alignof(
void*);
57 utils::FastPimpl<
typename iter_traits::native_iter, kNativeIterSize, kNativeIterAlignment> iter_pimpl_;
61 mutable std::optional<value_type> current_;