MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / insert

Method insert

include/win/boost/container/vector.hpp:1855–1859  ·  view source on GitHub ↗

Requires : p must be a valid iterator of *this. Effects : Insert n copies of x before pos. Returns : an iterator to the first inserted element or p if n is 0. Throws : If memory allocation throws or T's copy/move constructor throws. Complexity : Linear to n.

Source from the content-addressed store, hash-verified

1853 //!
1854 //! <b>Complexity</b>: Linear to n.
1855 iterator insert(const_iterator p, size_type n, const T& x)
1856 {
1857 container_detail::insert_n_copies_proxy<Allocator, T*> proxy(x);
1858 return this->priv_forward_range_insert(vector_iterator_get_ptr(p), n, proxy);
1859 }
1860
1861 //! <b>Requires</b>: p must be a valid iterator of *this.
1862 //!

Callers 5

assignMethod · 0.95
insertFunction · 0.45
priv_mergeFunction · 0.45
priv_swapFunction · 0.45

Calls 1

vector_iterator_get_ptrFunction · 0.85

Tested by

no test coverage detected