| 403 | } |
| 404 | |
| 405 | void node::clear() |
| 406 | { |
| 407 | if (is<array>()) |
| 408 | { |
| 409 | std::get<array>(m_data).clear(); |
| 410 | } |
| 411 | else if (is<object>()) |
| 412 | { |
| 413 | std::get<object>(m_data).clear(); |
| 414 | } |
| 415 | else |
| 416 | { |
| 417 | throw exceptions::invalid_cast( |
| 418 | object_type, to_string(type()), VILI_EXC_INFO); // TODO: Add array type |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | node::operator std::string_view() const |
| 423 | { |
no test coverage detected