TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ operator==()

template<typename BasicJsonType >
template<typename IterImpl , detail::enable_if_t<(std::is_same< IterImpl, iter_impl >::value||std::is_same< IterImpl, other_iter_impl >::value), std::nullptr_t > = nullptr>
bool nlohmann::detail::iter_impl< BasicJsonType >::operator== ( const IterImpl &  other) const
inline

comparison: equal

Precondition
The iterator is initialized; i.e. m_object != nullptr.

Definition at line 12132 of file json.hpp.

12133 {
12134 // if objects are not the same, the comparison is undefined
12135 if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))
12136 {
12137 JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", *m_object));
12138 }
12139
12140 JSON_ASSERT(m_object != nullptr);
12141
12142 switch (m_object->m_type)
12143 {
12144 case value_t::object:
12145 return (m_it.object_iterator == other.m_it.object_iterator);
12146
12147 case value_t::array:
12148 return (m_it.array_iterator == other.m_it.array_iterator);
12149
12150 case value_t::null:
12151 case value_t::string:
12152 case value_t::boolean:
12156 case value_t::binary:
12157 case value_t::discarded:
12158 default:
12159 return (m_it.primitive_iterator == other.m_it.primitive_iterator);
12160 }
12161 }
internal_iterator< typename std::remove_const< BasicJsonType >::type > m_it
the actual iterator of the associated instance
Definition: json.hpp:12410
@ number_integer
number value (signed integer)
@ discarded
discarded by the parser callback function
@ binary
binary array (ordered collection of bytes)
@ object
object (unordered set of name/value pairs)
@ number_float
number value (floating-point)
@ number_unsigned
number value (unsigned integer)
@ array
array (ordered collection of values)
primitive_iterator_t primitive_iterator
generic iterator for all other types
Definition: json.hpp:11661
BasicJsonType::array_t::iterator array_iterator
iterator for JSON arrays
Definition: json.hpp:11659
BasicJsonType::object_t::iterator object_iterator
iterator for JSON objects
Definition: json.hpp:11657