| 25 | template <typename V> |
| 26 | template <typename ForwardIt> |
| 27 | void SArray<V>::copyFrom(const ForwardIt first, const ForwardIt last) { |
| 28 | size_t size = std::distance(first, last); |
| 29 | V* data = new V[size + 5]; |
| 30 | reset(data, size); |
| 31 | for (size_t i = 0; i < size_; ++i) { |
| 32 | data_[i] = *(first+i); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | template <typename V> |
| 37 | void SArray<V>::copyFrom(const SArray<V>& arr) { |