23 Containers library [containers]

23.3 Sequence containers [sequences]

23.3.11 Class template list [list]

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

constexpr explicit list(const Allocator&);
Complexity: Constant.
constexpr explicit list(size_type n, const Allocator& = Allocator();
Effects: Constructs a list with n default-inserted elements using the specified allocator.
Complexity: Linear in n.
constexpr list(size_type n, const T& value, const Allocator& = Allocator();
Effects: Constructs a list with n copies of value, using the specified allocator.
Complexity: Linear in n.
template<class InputIterator> constexpr list(InputIterator first, InputIterator last, const Allocator& = Allocator();
Effects: Constructs a list equal to the range [first, last).
Complexity: Linear in distance(first, last).
template<container-compatible-range<T> R> constexpr list(from_range_t, R&& rg, const Allocator& = Allocator();
Complexity: Linear in ranges​::​distance(rg).

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant