From Jason Turner

[flat.set.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp6anvc7be/{from.md → to.md} +82 -0
tmp/tmp6anvc7be/{from.md → to.md} RENAMED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Constructors <a id="flat.set.cons">[[flat.set.cons]]</a>
2
+
3
+ ``` cpp
4
+ explicit flat_set(container_type cont, const key_compare& comp = key_compare());
5
+ ```
6
+
7
+ *Effects:* Initializes *c* with `std::move(cont)` and *compare* with
8
+ `comp`, sorts the range \[`begin()`, `end()`) with respect to *compare*,
9
+ and finally erases all but the first element from each group of
10
+ consecutive equivalent elements.
11
+
12
+ *Complexity:* Linear in N if `cont` is sorted with respect to *compare*
13
+ and otherwise N log N, where N is the value of `cont.size()` before this
14
+ call.
15
+
16
+ ``` cpp
17
+ template<class Allocator>
18
+ flat_set(const container_type& cont, const Allocator& a);
19
+ template<class Allocator>
20
+ flat_set(const container_type& cont, const key_compare& comp, const Allocator& a);
21
+ ```
22
+
23
+ *Constraints:* `uses_allocator_v<container_type, Allocator>` is `true`.
24
+
25
+ *Effects:* Equivalent to `flat_set(cont)` and `flat_set(cont, comp)`,
26
+ respectively, except that *c* is constructed with uses-allocator
27
+ construction [[allocator.uses.construction]].
28
+
29
+ *Complexity:* Same as `flat_set(cont)` and `flat_set(cont, comp)`,
30
+ respectively.
31
+
32
+ ``` cpp
33
+ template<class Allocator>
34
+ flat_set(sorted_unique_t s, const container_type& cont, const Allocator& a);
35
+ template<class Allocator>
36
+ flat_set(sorted_unique_t s, const container_type& cont,
37
+ const key_compare& comp, const Allocator& a);
38
+ ```
39
+
40
+ *Constraints:* `uses_allocator_v<container_type, Allocator>` is `true`.
41
+
42
+ *Effects:* Equivalent to `flat_set(s, cont)` and
43
+ `flat_set(s, cont, comp)`, respectively, except that *c* is constructed
44
+ with uses-allocator construction [[allocator.uses.construction]].
45
+
46
+ *Complexity:* Linear.
47
+
48
+ ``` cpp
49
+ template<class Allocator>
50
+ flat_set(const key_compare& comp, const Allocator& a);
51
+ template<class Allocator>
52
+ explicit flat_set(const Allocator& a);
53
+ template<class InputIterator, class Allocator>
54
+ flat_set(InputIterator first, InputIterator last, const key_compare& comp, const Allocator& a);
55
+ template<class InputIterator, class Allocator>
56
+ flat_set(InputIterator first, InputIterator last, const Allocator& a);
57
+ template<container-compatible-range<value_type> R, class Allocator>
58
+ flat_set(from_range_t, R&& rg, const Allocator& a);
59
+ template<container-compatible-range<value_type> R, class Allocator>
60
+ flat_set(from_range_t, R&& rg, const key_compare& comp, const Allocator& a);
61
+ template<class InputIterator, class Allocator>
62
+ flat_set(sorted_unique_t, InputIterator first, InputIterator last,
63
+ const key_compare& comp, const Allocator& a);
64
+ template<class InputIterator, class Allocator>
65
+ flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Allocator& a);
66
+ template<class Allocator>
67
+ flat_set(initializer_list<value_type> il, const key_compare& comp, const Allocator& a);
68
+ template<class Allocator>
69
+ flat_set(initializer_list<value_type> il, const Allocator& a);
70
+ template<class Allocator>
71
+ flat_set(sorted_unique_t, initializer_list<value_type> il,
72
+ const key_compare& comp, const Allocator& a);
73
+ template<class Allocator>
74
+ flat_set(sorted_unique_t, initializer_list<value_type> il, const Allocator& a);
75
+ ```
76
+
77
+ *Constraints:* `uses_allocator_v<container_type, Allocator>` is `true`.
78
+
79
+ *Effects:* Equivalent to the corresponding non-allocator constructors
80
+ except that *c* is constructed with uses-allocator
81
+ construction [[allocator.uses.construction]].
82
+