iterator.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. #ifndef VALUE_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  2. #define VALUE_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  3. #if defined(_MSC_VER) || \
  4. (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
  5. (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
  6. #pragma once
  7. #endif
  8. #include "yaml-cpp/dll.h"
  9. #include "yaml-cpp/node/node.h"
  10. #include "yaml-cpp/node/detail/iterator_fwd.h"
  11. #include "yaml-cpp/node/detail/iterator.h"
  12. #include <list>
  13. #include <utility>
  14. #include <vector>
  15. namespace YAML {
  16. namespace detail {
  17. struct iterator_value : public Node, std::pair<Node, Node> {
  18. iterator_value() = default;
  19. explicit iterator_value(const Node& rhs)
  20. : Node(rhs),
  21. std::pair<Node, Node>(Node(Node::ZombieNode), Node(Node::ZombieNode)) {}
  22. explicit iterator_value(const Node& key, const Node& value)
  23. : Node(Node::ZombieNode), std::pair<Node, Node>(key, value) {}
  24. };
  25. }
  26. }
  27. #endif // VALUE_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66