| 473 | } |
| 474 | |
| 475 | void node::insert(size_t index, const node& value) |
| 476 | { |
| 477 | if (is<array>()) |
| 478 | { |
| 479 | auto& vector = std::get<array>(m_data); |
| 480 | vector.insert(vector.cbegin() + index, value); |
| 481 | } |
| 482 | else |
| 483 | { |
| 484 | throw exceptions::invalid_cast(array_type, to_string(type()), VILI_EXC_INFO); |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | void node::insert(const std::string& key, node value) |
| 489 | { |