Files
2025-10-25 03:02:53 +03:00

3.3 KiB
Raw Permalink Blame History

[deque.cons]

23 Containers library [containers]

23.3 Sequence containers [sequences]

23.3.5 Class template deque [deque]

23.3.5.2 Constructors, copy, and assignment [deque.cons]

🔗

constexpr explicit deque(const Allocator&);

1

#

Effects: Constructs an emptydeque, using the specified allocator.

2

#

Complexity: Constant.

🔗

constexpr explicit deque(size_type n, const Allocator& = Allocator());

3

#

Preconditions: T is Cpp17DefaultInsertable into deque.

4

#

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

5

#

Complexity: Linear in n.

🔗

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

6

#

Preconditions: T is Cpp17CopyInsertable into deque.

7

#

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

8

#

Complexity: Linear in n.

🔗

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

9

#

Effects: Constructs adeque equal to the range [first, last), using the specified allocator.

10

#

Complexity: Linear in distance(first, last).

🔗

template<[container-compatible-range](container.intro.reqmts#concept:container-compatible-range "23.2.2.1Introduction[container.intro.reqmts]")<T> R> constexpr deque(from_range_t, R&& rg, const Allocator& = Allocator());

11

#

Effects: Constructs a deque with the elements of the range rg, using the specified allocator.

12

#

Complexity: Linear in ranges::distance(rg).