| 3189 | // (1) Iterator supports operator-, resize before inserting |
| 3190 | template <class ForwardIterator> |
| 3191 | void _insert(ForwardIterator f, ForwardIterator l, std::forward_iterator_tag /*unused*/) |
| 3192 | { |
| 3193 | int64_t dist = std::distance(f, l); |
| 3194 | if (dist < 0 || static_cast<size_t>(dist) >= (std::numeric_limits<size_type>::max)()) |
| 3195 | throw_exception(std::length_error("insert-range overflow")); |
| 3196 | |
| 3197 | _resize_delta(static_cast<size_type>(dist)); |
| 3198 | |
| 3199 | for (; dist > 0; --dist, ++f) |
| 3200 | _insert_noresize(*f); |
| 3201 | } |
| 3202 | |
| 3203 | // (2) Arbitrary iterator, can't tell how much to resize |
| 3204 | template <class InputIterator> |
nothing calls this directly
no test coverage detected