MCPcopy Index your code
hub / github.com/IntegralPilot/wasm_os / insert

Method insert

stdlib/cpp/vector.hpp:196–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194 }
195
196 iterator insert(iterator pos, const T& value) {
197 size_type index = pos - begin();
198 if (size_ == capacity_) {
199 grow_capacity();
200 pos = begin() + index;
201 }
202
203 new (&data_[size_]) T();
204 for (size_type i = size_; i > index; --i) {
205 data_[i] = std::move(data_[i - 1]);
206 }
207
208 data_[index] = value;
209 ++size_;
210 return begin() + index;
211 }
212
213 iterator insert(iterator pos, iterator start, iterator end) {
214 size_type count = end - start;

Callers 2

solveMethod · 0.80
mainFunction · 0.80

Calls 2

beginMethod · 0.95
moveFunction · 0.85

Tested by

no test coverage detected