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

71
cppdraft/multimap/cons.md Normal file
View File

@@ -0,0 +1,71 @@
[multimap.cons]
# 23 Containers library [[containers]](./#containers)
## 23.4 Associative containers [[associative]](associative#multimap.cons)
### 23.4.4 Class template multimap [[multimap]](multimap#cons)
#### 23.4.4.2 Constructors [multimap.cons]
[🔗](#lib:multimap,constructor)
`constexpr explicit multimap(const Compare& comp, const Allocator& = Allocator());
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L12459)
*Effects*: Constructs an emptymultimap using the specified comparison object and allocator[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L12465)
*Complexity*: Constant[.](#2.sentence-1)
[🔗](#lib:multimap,constructor_)
`template<class InputIterator>
constexpr multimap(InputIterator first, InputIterator last,
const Compare& comp = Compare(), const Allocator& = Allocator());
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L12478)
*Effects*: Constructs an emptymultimap using the specified comparison object and allocator,
and inserts elements from the range
[first, last)[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L12486)
*Complexity*: Linear in N if the range
[first, last)
is already sorted with respect to comp and otherwise NlogN,
where N islast - first[.](#4.sentence-1)
[🔗](#lib:multimap,constructor__)
`template<[container-compatible-range](container.intro.reqmts#concept:container-compatible-range "23.2.2.1Introduction[container.intro.reqmts]")<value_type> R>
constexpr multimap(from_range_t, R&& rg,
const Compare& comp = Compare(), const Allocator& = Allocator());
`
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L12504)
*Effects*: Constructs an empty multimap using the specified comparison object and allocator, and
inserts elements from the range rg[.](#5.sentence-1)
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L12510)
*Complexity*: Linear in N if rg is already sorted with respect to comp and
otherwise NlogN, where N is ranges::distance(rg)[.](#6.sentence-1)

View File

@@ -0,0 +1,22 @@
[multimap.erasure]
# 23 Containers library [[containers]](./#containers)
## 23.4 Associative containers [[associative]](associative#multimap.erasure)
### 23.4.4 Class template multimap [[multimap]](multimap#erasure)
#### 23.4.4.4 Erasure [multimap.erasure]
[🔗](#lib:erase_if,multimap)
`template<class Key, class T, class Compare, class Allocator, class Predicate>
typename multimap<Key, T, Compare, Allocator>::size_type
constexpr erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L12546)
*Effects*: Equivalent to:auto original_size = c.size();for (auto i = c.begin(), last = c.end(); i != last; ) {if (pred(*i)) { i = c.erase(i); } else {++i; }}return original_size - c.size();

View File

@@ -0,0 +1,30 @@
[multimap.modifiers]
# 23 Containers library [[containers]](./#containers)
## 23.4 Associative containers [[associative]](associative#multimap.modifiers)
### 23.4.4 Class template multimap [[multimap]](multimap#modifiers)
#### 23.4.4.3 Modifiers [multimap.modifiers]
[🔗](#lib:insert,multimap)
`template<class P> constexpr iterator insert(P&& x);
template<class P> constexpr iterator insert(const_iterator position, P&& x);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L12525)
*Constraints*: is_constructible_v<value_type, P&&> is true[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L12529)
*Effects*: The first form is equivalent toreturn emplace(std::forward<P>(x))[.](#2.sentence-1)
The second form is
equivalent to return emplace_hint(position, std::forward<P>(x))[.](#2.sentence-2)

File diff suppressed because one or more lines are too long