MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / operator==

Function operator==

extern/json/json.hpp:13259–13288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13257 */
13258 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 >
13259 bool operator==(const IterImpl& other) const
13260 {
13261 // if objects are not the same, the comparison is undefined
13262 if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))
13263 {
13264 JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object));
13265 }
13266
13267 JSON_ASSERT(m_object != nullptr);
13268
13269 switch (m_object->m_type)
13270 {
13271 case value_t::object:
13272 return (m_it.object_iterator == other.m_it.object_iterator);
13273
13274 case value_t::array:
13275 return (m_it.array_iterator == other.m_it.array_iterator);
13276
13277 case value_t::null:
13278 case value_t::string:
13279 case value_t::boolean:
13280 case value_t::number_integer:
13281 case value_t::number_unsigned:
13282 case value_t::number_float:
13283 case value_t::binary:
13284 case value_t::discarded:
13285 default:
13286 return (m_it.primitive_iterator == other.m_it.primitive_iterator);
13287 }
13288 }
13289
13290 /*!
13291 @brief comparison: not equal

Callers

nothing calls this directly

Calls 3

basic_jsonFunction · 0.85
createFunction · 0.70
json_pointerFunction · 0.70

Tested by

no test coverage detected