Init
This commit is contained in:
71
cppdraft/multiset/cons.md
Normal file
71
cppdraft/multiset/cons.md
Normal file
@@ -0,0 +1,71 @@
|
||||
[multiset.cons]
|
||||
|
||||
# 23 Containers library [[containers]](./#containers)
|
||||
|
||||
## 23.4 Associative containers [[associative]](associative#multiset.cons)
|
||||
|
||||
### 23.4.7 Class template multiset [[multiset]](multiset#cons)
|
||||
|
||||
#### 23.4.7.2 Constructors [multiset.cons]
|
||||
|
||||
[ð](#lib:multiset,constructor)
|
||||
|
||||
`constexpr explicit multiset(const Compare& comp, const Allocator& = Allocator());
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L13229)
|
||||
|
||||
*Effects*: Constructs an empty multiset using the specified comparison object and allocator[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L13233)
|
||||
|
||||
*Complexity*: Constant[.](#2.sentence-1)
|
||||
|
||||
[ð](#lib:multiset,constructor_)
|
||||
|
||||
`template<class InputIterator>
|
||||
constexpr multiset(InputIterator first, InputIterator last,
|
||||
const Compare& comp = Compare(), const Allocator& = Allocator());
|
||||
`
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L13246)
|
||||
|
||||
*Effects*: Constructs an emptymultiset 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#L13254)
|
||||
|
||||
*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:multiset,constructor__)
|
||||
|
||||
`template<[container-compatible-range](container.intro.reqmts#concept:container-compatible-range "23.2.2.1 Introduction [container.intro.reqmts]")<value_type> R>
|
||||
constexpr multiset(from_range_t, R&& rg, const Compare& comp = Compare(),
|
||||
const Allocator& = Allocator());
|
||||
`
|
||||
|
||||
[5](#5)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L13272)
|
||||
|
||||
*Effects*: Constructs an empty multiset 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#L13278)
|
||||
|
||||
*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)
|
||||
22
cppdraft/multiset/erasure.md
Normal file
22
cppdraft/multiset/erasure.md
Normal file
@@ -0,0 +1,22 @@
|
||||
[multiset.erasure]
|
||||
|
||||
# 23 Containers library [[containers]](./#containers)
|
||||
|
||||
## 23.4 Associative containers [[associative]](associative#multiset.erasure)
|
||||
|
||||
### 23.4.7 Class template multiset [[multiset]](multiset#erasure)
|
||||
|
||||
#### 23.4.7.3 Erasure [multiset.erasure]
|
||||
|
||||
[ð](#lib:erase_if,multiset)
|
||||
|
||||
`template<class Key, class Compare, class Allocator, class Predicate>
|
||||
constexpr typename multiset<Key, Compare, Allocator>::size_type
|
||||
erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L13294)
|
||||
|
||||
*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();
|
||||
49
cppdraft/multiset/overview.md
Normal file
49
cppdraft/multiset/overview.md
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user