19 using YamlIterator = formats::
yaml::Value::const_iterator;
20 using iterator_category = std::forward_iterator_tag;
21 using difference_type = std::ptrdiff_t;
22 using value_type =
typename IterTraits::value_type;
23 using reference =
typename IterTraits::reference;
24 using pointer =
typename IterTraits::pointer;
28 Iterator(
const value_type& container, YamlIterator it)
29 : container_(&container),
33 Iterator(
const Iterator& other);
34 Iterator(Iterator&& other)
noexcept;
35 Iterator& operator=(
const Iterator&);
36 Iterator& operator=(Iterator&&)
noexcept;
38 Iterator operator++(
int);
39 Iterator& operator++();
41 reference operator*()
const {
45 pointer operator->()
const {
55 std::string GetName()
const;
57 bool operator==(
const Iterator& other)
const {
return it_ == other.it_; }
58 bool operator!=(
const Iterator& other)
const {
return it_ != other.it_; }
61 void UpdateValue()
const;
62 void IncrementInternalIterator();
66 const value_type* container_{
nullptr};
70 mutable std::optional<value_type> current_;