| 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 | { |
nothing calls this directly
no test coverage detected