constructor · 11 overloads
std::list::list
- Header
<list>- Draft
- [list.overview]
- Scope
std::list- cppreference
- std::list::list
Constructors
Overloads
- (1)
constexpr list() noexcept(is_nothrow_default_constructible_v<Allocator>); - (2)
constexpr list(const list& x); - (3)
constexpr list(list&& x) noexcept(is_nothrow_move_constructible_v<node_alloc>); - (4)
explicit constexpr list(const Allocator& a) noexcept; - (5)
explicit constexpr list(size_type n, const Allocator& a = Allocator()); - (6)
constexpr list(initializer_list<T> il, const Allocator& a = Allocator()); - (7)
constexpr list(const list& x, const Allocator& a); - (8)
constexpr list(list&& x, const Allocator& a) noexcept(always_equal); - (9)
constexpr list( size_type n, const T& value, const Allocator& a = Allocator()); - (10)
template<class InputIterator> requires qualifies-as-input-iterator<InputIterator> constexpr list( InputIterator first, InputIterator last, const Allocator& a = Allocator()); - (11)
template</* implementation-defined */ R> constexpr list(from_range_t, R&& rg, const Allocator& a = Allocator());