From Jason Turner

[set.modifiers]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmps2gcgwv5/{from.md → to.md} +27 -0
tmp/tmps2gcgwv5/{from.md → to.md} RENAMED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Modifiers <a id="set.modifiers">[[set.modifiers]]</a>
2
+
3
+ ``` cpp
4
+ template<class K> constexpr pair<iterator, bool> insert(K&& x);
5
+ template<class K> constexpr iterator insert(const_iterator hint, K&& x);
6
+ ```
7
+
8
+ *Constraints:* The *qualified-id* `Compare::is_transparent` is valid and
9
+ denotes a type. For the second overload,
10
+ `is_convertible_v<K&&, const_iterator>` and
11
+ `is_convertible_v<K&&, iterator>` are both `false`.
12
+
13
+ *Preconditions:* `value_type` is *Cpp17EmplaceConstructible* into `set`
14
+ from `std::forward<K>(x)`.
15
+
16
+ *Effects:* If the set already contains an element that is equivalent to
17
+ `x`, there is no effect. Otherwise, let `r` be `equal_range(x)`.
18
+ Constructs an object `u` of type `value_type` with `std::forward<K>(x)`.
19
+ If `equal_range(u) == r` is `false`, the behavior is undefined. Inserts
20
+ `u` into `*this`.
21
+
22
+ *Returns:* For the first overload, the `bool` component of the returned
23
+ pair is `true` if and only if the insertion took place. The returned
24
+ iterator points to the set element that is equivalent to `x`.
25
+
26
+ *Complexity:* Logarithmic.
27
+