internal_iterator.hpp 676 B

12345678910111213141516171819202122232425
  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. /// generic iterator for all other types
  19. primitive_iterator_t primitive_iterator {};
  20. };
  21. }
  22. }