MCPcopy Create free account
hub / github.com/boostorg/parser / operator==

Method operator==

example/json.hpp:296–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294 bool is_array() const noexcept { return kind() == value_kind::array; }
295
296 bool operator==(value const & rhs) const noexcept
297 {
298 if (rhs.kind() != kind())
299 return false;
300 switch (storage_.local_.kind_) {
301 case value::null_k: return true;
302 case value::boolean_k:
303 return storage_.local_.bytes_[3] ==
304 rhs.storage_.local_.bytes_[3];
305 case value::number_k: return *double_ptr() == *rhs.double_ptr();
306 case value::local_string_k:
307 return strcmp(
308 storage_.local_.bytes_.data(),
309 rhs.storage_.local_.bytes_.data()) == 0;
310 default: return storage_.remote_.ptr_->equal_impl(rhs);
311 }
312 return false;
313 }
314
315 bool operator!=(value const & rhs) const noexcept
316 {

Callers

nothing calls this directly

Calls 4

double_ptrMethod · 0.80
dataMethod · 0.80
kindMethod · 0.45
equal_implMethod · 0.45

Tested by

no test coverage detected