This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

113
cppdraft/deque/cons.md Normal file
View File

@@ -0,0 +1,113 @@
[deque.cons]
# 23 Containers library [[containers]](./#containers)
## 23.3 Sequence containers [[sequences]](sequences#deque.cons)
### 23.3.5 Class template deque [[deque]](deque#cons)
#### 23.3.5.2 Constructors, copy, and assignment [deque.cons]
[🔗](#lib:deque,constructor)
`constexpr explicit deque(const Allocator&);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6624)
*Effects*: Constructs an emptydeque,
using the specified allocator[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6630)
*Complexity*: Constant[.](#2.sentence-1)
[🔗](#lib:deque,constructor_)
`constexpr explicit deque(size_type n, const Allocator& = Allocator());
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6641)
*Preconditions*: T is *Cpp17DefaultInsertable* into deque[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6645)
*Effects*: Constructs a deque withn default-inserted elements using the specified allocator[.](#4.sentence-1)
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6650)
*Complexity*: Linear in n[.](#5.sentence-1)
[🔗](#lib:deque,constructor__)
`constexpr deque(size_type n, const T& value, const Allocator& = Allocator());
`
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6661)
*Preconditions*: T is *Cpp17CopyInsertable* into deque[.](#6.sentence-1)
[7](#7)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6665)
*Effects*: Constructs adeque with n copies of value,
using the specified allocator[.](#7.sentence-1)
[8](#8)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6672)
*Complexity*: Linear in n[.](#8.sentence-1)
[🔗](#lib:deque,constructor___)
`template<class InputIterator>
constexpr deque(InputIterator first, InputIterator last, const Allocator& = Allocator());
`
[9](#9)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6684)
*Effects*: Constructs adeque equal to the range
[first, last),
using the specified allocator[.](#9.sentence-1)
[10](#10)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6692)
*Complexity*: Linear in distance(first, last)[.](#10.sentence-1)
[🔗](#lib:deque,constructor____)
`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](#11)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6704)
*Effects*: Constructs a deque with the elements of the range rg,
using the specified allocator[.](#11.sentence-1)
[12](#12)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6709)
*Complexity*: Linear in ranges::distance(rg)[.](#12.sentence-1)