| 506 | |
| 507 | template <typename Input> |
| 508 | void addItemsGeneralSlowPath(const Input& sourceArray) { |
| 509 | reserve(size() + sourceArray.size()); |
| 510 | for (const auto& item : sourceArray) { |
| 511 | if (item.has_value()) { |
| 512 | auto& writer = add_item(); |
| 513 | writer.copy_from(item.value()); |
| 514 | } else { |
| 515 | add_null(); |
| 516 | } |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | template <typename VectorType> |
| 521 | void addItemsGeneric(const VectorType& arrayView) { |