23 Containers library [containers]

23.3 Sequence containers [sequences]

23.3.5 Class template list [list]

23.3.5.2 list constructors, copy, and assignment [list.cons]

explicit list(const Allocator&);

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

Complexity: Constant.

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

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

Requires: T shall be DefaultInsertable into *this.

Complexity: Linear in n.

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

Effects: Constructs a list with n copies of value, using the specified allocator.

Requires: T shall be CopyInsertable into *this.

Complexity: Linear in n.

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

Effects: Constructs a list equal to the range [first,last).

Complexity: Linear in distance(first, last).