internal_iterator.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // __ _____ _____ _____
  2. // __| | __| | | | JSON for Modern C++
  3. // | | |__ | | | | | | version 3.11.3
  4. // |_____|_____|_____|_|___| https://github.com/nlohmann/json
  5. //
  6. // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
  7. // SPDX-License-Identifier: MIT
  8. #pragma once
  9. #include <nlohmann/detail/abi_macros.hpp>
  10. #include <nlohmann/detail/iterators/primitive_iterator.hpp>
  11. NLOHMANN_JSON_NAMESPACE_BEGIN
  12. namespace detail
  13. {
  14. /*!
  15. @brief an iterator value
  16. @note This structure could easily be a union, but MSVC currently does not allow
  17. unions members with complex constructors, see https://github.com/nlohmann/json/pull/105.
  18. */
  19. template<typename BasicJsonType> struct internal_iterator
  20. {
  21. /// iterator for JSON objects
  22. typename BasicJsonType::object_t::iterator object_iterator {};
  23. /// iterator for JSON arrays
  24. typename BasicJsonType::array_t::iterator array_iterator {};
  25. /// generic iterator for all other types
  26. primitive_iterator_t primitive_iterator {};
  27. };
  28. } // namespace detail
  29. NLOHMANN_JSON_NAMESPACE_END