21 Containers library [containers]

21.3 Sequence containers [sequences]

21.3.11 Class template vector [vector]

21.3.11.2 Constructors, copy, and assignment [vector.cons]

explicit vector(const Allocator&) noexcept;
Effects: Constructs an empty vector, using the specified allocator.
Complexity: Constant.
explicit vector(size_type n, const Allocator& = Allocator());
Effects: Constructs a vector with n default-inserted elements using the specified allocator.
Requires: T shall be Cpp17DefaultInsertable into *this.
Complexity: Linear in n.
vector(size_type n, const T& value, const Allocator& = Allocator());
Effects: Constructs a vector with n copies of value, using the specified allocator.
Requires: T shall be Cpp17CopyInsertable into *this.
Complexity: Linear in n.
template<class InputIterator> vector(InputIterator first, InputIterator last, const Allocator& = Allocator());
Effects: Constructs a vector equal to the range [first, last), using the specified allocator.
Complexity: Makes only N calls to the copy constructor of T (where N is the distance between first and last) and no reallocations if iterators first and last are of forward, bidirectional, or random access categories.
It makes order N calls to the copy constructor of T and order logN reallocations if they are just input iterators.