[list.cons] (original) (raw)

22 Containers library [containers]

22.3 Sequence containers [sequences]

22.3.10 Class template list [list]

22.3.10.2 Constructors, copy, and assignment [list.cons]

explicit list(const Allocator&);

Effects:Constructs an empty list, using the specified allocator.

explicit list(size_type n, const Allocator& = Allocator());

Preconditions: T is Cpp17DefaultInsertable into *this.

Effects:Constructs a list withn default-inserted elements using the specified allocator.

list(size_type n, const T& value, const Allocator& = Allocator());

Preconditions: T is Cpp17CopyInsertable into *this.

Effects:Constructs alistwithncopies ofvalue, using the specified allocator.

template<class InputIterator> list(InputIterator first, InputIterator last, const Allocator& = Allocator());

Effects:Constructs alistequal to the range[first, last).

Complexity:Linear indistance(first, last).