internal_iterator.hpp 843 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <nlohmann/detail/iterators/primitive_iterator.hpp>
  3. namespace nlohmann
  4. {
  5. namespace detail
  6. {
  7. /*!
  8. @brief an iterator value
  9. @note This structure could easily be a union, but MSVC currently does not allow
  10. unions members with complex constructors, see https://github.com/nlohmann/json/pull/105.
  11. */
  12. template<typename BasicJsonType> struct internal_iterator
  13. {
  14. /// iterator for JSON objects
  15. typename BasicJsonType::object_t::iterator object_iterator {};
  16. /// iterator for JSON arrays
  17. typename BasicJsonType::array_t::iterator array_iterator {};
  18. /// iterator for JSON binary arrays
  19. typename BasicJsonType::binary_t::container_type::iterator binary_iterator {};
  20. /// generic iterator for all other types
  21. primitive_iterator_t primitive_iterator {};
  22. };
  23. } // namespace detail
  24. } // namespace nlohmann