23 Containers library [containers]

23.3 Sequence containers [sequences]

23.3.7 Class template forward_list [forward.list]

23.3.7.2 Constructors, copy, and assignment [forward.list.cons]

constexpr explicit forward_list(const Allocator&);
Complexity: Constant.
constexpr explicit forward_list(size_type n, const Allocator& = Allocator();
Effects: Constructs a forward_list object with n default-inserted elements using the specified allocator.
Complexity: Linear in n.
constexpr forward_list(size_type n, const T& value, const Allocator& = Allocator();
Complexity: Linear in n.
template<class InputIterator> constexpr forward_list(InputIterator first, InputIterator last, const Allocator& = Allocator();
Complexity: Linear in distance(first, last).
template<container-compatible-range<T> R> constexpr forward_list(from_range_t, R&& rg, const Allocator& = Allocator();
Effects: Constructs a forward_list object with the elements of the range rg.
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