22 Containers library [containers]

22.3 Sequence containers [sequences]

22.3.11 Class template vector [vector]

22.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());
Expects: T is Cpp17DefaultInsertable into *this.
Effects: Constructs a vector with n default-inserted elements using the specified allocator.
Complexity: Linear in n.
vector(size_type n, const T& value, const Allocator& = Allocator());
Expects: T is Cpp17CopyInsertable into *this.
Effects: Constructs a vector with n copies of value, using the specified allocator.
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.