14 using YamlIterator =
formats::
yaml::Value::const_iterator;
15 using iterator_category = std::forward_iterator_tag;
16 using difference_type = std::ptrdiff_t;
17 using value_type =
typename IterTraits::value_type;
18 using reference =
typename IterTraits::reference;
19 using pointer =
typename IterTraits::pointer;
21 Iterator(
const value_type& container, YamlIterator it)
22 : container_(&container),
26 Iterator(
const Iterator& other);
27 Iterator(Iterator&& other)
noexcept;
28 Iterator& operator=(
const Iterator&);
29 Iterator& operator=(Iterator&&)
noexcept;
31 Iterator operator++(
int);
32 Iterator& operator++();
34 reference operator*()
const {
38 pointer operator->()
const {
48 std::string GetName()
const;
50 bool operator==(
const Iterator& other)
const {
return it_ == other.it_; }
51 bool operator!=(
const Iterator& other)
const {
return it_ != other.it_; }
54 void UpdateValue()
const;
55 void IncrementInternalIterator();
59 const value_type* container_{
nullptr};
63 mutable std::optional<value_type> current_;