add detail/iterators/internal_iterator.hpp

上级 51ecc31d
......@@ -13,7 +13,8 @@ SRCS = ${SRCDIR}/json.hpp \
${SRCDIR}/detail/parsing/input_adapters.hpp \
${SRCDIR}/detail/parsing/lexer.hpp \
${SRCDIR}/detail/parsing/parser.hpp \
${SRCDIR}/detail/iterators/primitive_iterator.hpp
${SRCDIR}/detail/iterators/primitive_iterator.hpp \
${SRCDIR}/detail/iterators/internal_iterator.hpp
......
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_INTERNAL_ITERATOR_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_INTERNAL_ITERATOR_HPP
#include "detail/iterators/primitive_iterator.hpp"
namespace nlohmann
{
namespace detail
{
/*!
@brief an iterator value
@note This structure could easily be a union, but MSVC currently does not allow
unions members with complex constructors, see https://github.com/nlohmann/json/pull/105.
*/
template<typename BasicJsonType> struct internal_iterator
{
/// iterator for JSON objects
typename BasicJsonType::object_t::iterator object_iterator {};
/// iterator for JSON arrays
typename BasicJsonType::array_t::iterator array_iterator {};
/// generic iterator for all other types
primitive_iterator_t primitive_iterator {};
};
}
}
#endif
......@@ -61,6 +61,7 @@ SOFTWARE.
#include "detail/parsing/lexer.hpp"
#include "detail/parsing/parser.hpp"
#include "detail/iterators/primitive_iterator.hpp"
#include "detail/iterators/internal_iterator.hpp"
/*!
@brief namespace for Niels Lohmann
......@@ -75,22 +76,6 @@ namespace detail
// iterators //
///////////////
/*!
@brief an iterator value
@note This structure could easily be a union, but MSVC currently does not allow
unions members with complex constructors, see https://github.com/nlohmann/json/pull/105.
*/
template<typename BasicJsonType> struct internal_iterator
{
/// iterator for JSON objects
typename BasicJsonType::object_t::iterator object_iterator {};
/// iterator for JSON arrays
typename BasicJsonType::array_t::iterator array_iterator {};
/// generic iterator for all other types
primitive_iterator_t primitive_iterator {};
};
template<typename IteratorType> class iteration_proxy;
/*!
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册