vector::vector
vector::vector
explicit vector(const A& al = A());
explicit vector(size_type n, const T& v = T(), const A& al = A());
vector(const vector& x);
vector(const_iterator first, const_iterator last,
const A& al = A());
All constructors store the allocator objectal
(or, for the copy constructor, x.
get_allocator
()
) in allocator
and initialize the controlled sequence. The first constructor specifies an empty initial controlled sequence. The second constructor specifies a repetition of n
elements of value x
. The third constructor specifies a copy of the sequence controlled by x
. The last constructor specifies the sequence [first, last)
.
In this implementation, if a translator does not support member template functions, the template:
template<class InIt>
vector(InIt first, InIt last, const A& al = A());
is replaced by:
vector(const_iterator first, const_iterator last,
const A& al = A());
All constructors copy N
elements and perform no interim reallocation.