|
1 | 1 | ---
|
2 |
| -description: "Learn more about: <unordered_set> operators" |
3 | 2 | title: "<unordered_set> operators"
|
4 |
| -ms.date: "11/04/2016" |
| 3 | +description: "Learn more about: <unordered_set> operators" |
| 4 | +ms.date: 11/04/2016 |
5 | 5 | f1_keywords: ["unordered_set/std::operator!=", "unordered_set/std::operator=="]
|
6 |
| -ms.assetid: 8653eea6-12f2-4dd7-aa2f-db38a71599a0 |
7 | 6 | ---
|
8 | 7 | # `<unordered_set>` operators
|
9 | 8 |
|
10 |
| -## <a name="op_neq"></a> operator!= |
| 9 | +The `<unordered_set>` header provides the following operators: |
| 10 | + |
| 11 | +## <a name="op_neq"></a> `operator!=` |
11 | 12 |
|
12 |
| -Tests whether the [unordered_set](../standard-library/unordered-set-class.md) object on the left side of the operator is not equal to the unordered_set object on the right side. |
| 13 | +Tests whether the [`unordered_set`](unordered-set-class.md) object on the left side of the operator is not equal to the `unordered_set` object on the right side. |
13 | 14 |
|
14 | 15 | ```cpp
|
15 | 16 | bool operator!=(const unordered_set <Key, Hash, Pred, Allocator>& left, const unordered_set <Key, Hash, Pred, Allocator>& right);
|
16 | 17 | ```
|
17 | 18 |
|
18 | 19 | ### Parameters
|
19 | 20 |
|
20 |
| -*left*\ |
| 21 | +*`left`*\ |
21 | 22 | An object of type `unordered_set`.
|
22 | 23 |
|
23 |
| -*right*\ |
| 24 | +*`right`*\ |
24 | 25 | An object of type `unordered_set`.
|
25 | 26 |
|
26 | 27 | ### Return Value
|
27 | 28 |
|
28 |
| -**`true`** if the unordered_sets are not equal; **`false`** if they are equal. |
| 29 | +**`true`** if the `unordered_set`s are not equal; **`false`** if they are equal. |
29 | 30 |
|
30 | 31 | ### Remarks
|
31 | 32 |
|
32 |
| -The comparison between unordered_set objects is not affected by the arbitrary order in which they store their elements. Two unordered_sets are equal if they have the same number of elements and the elements in one container are a permutation of the elements in the other container. Otherwise, they are unequal. |
| 33 | +The comparison between `unordered_set` objects is not affected by the arbitrary order in which they store their elements. Two `unordered_set`s are equal if they have the same number of elements and the elements in one container are a permutation of the elements in the other container. Otherwise, they are unequal. |
33 | 34 |
|
34 | 35 | ### Example
|
35 | 36 |
|
@@ -67,37 +68,35 @@ int main()
|
67 | 68 | }
|
68 | 69 | ```
|
69 | 70 |
|
70 |
| -**Output:** |
71 |
| - |
72 |
| -`c1 != c2: true` |
73 |
| - |
74 |
| -`c1 != c3: false` |
75 |
| - |
76 |
| -`c2 != c3: true` |
| 71 | +```Output |
| 72 | +c1 != c2: true |
| 73 | +c1 != c3: false |
| 74 | +c2 != c3: true |
| 75 | +``` |
77 | 76 |
|
78 |
| -## <a name="op_eq_eq"></a> operator== |
| 77 | +## <a name="op_eq_eq"></a> `operator==` |
79 | 78 |
|
80 |
| -Tests whether the [unordered_set](../standard-library/unordered-set-class.md) object on the left side of the operator is equal to the unordered_set object on the right side. |
| 79 | +Tests whether the [`unordered_set`](unordered-set-class.md) object on the left side of the operator is equal to the `unordered_set` object on the right side. |
81 | 80 |
|
82 | 81 | ```cpp
|
83 | 82 | bool operator==(const unordered_set <Key, Hash, Pred, Allocator>& left, const unordered_set <Key, Hash, Pred, Allocator>& right);
|
84 | 83 | ```
|
85 | 84 |
|
86 | 85 | ### Parameters
|
87 | 86 |
|
88 |
| -*left*\ |
| 87 | +*`left`*\ |
89 | 88 | An object of type `unordered_set`.
|
90 | 89 |
|
91 |
| -*right*\ |
| 90 | +*`right`*\ |
92 | 91 | An object of type `unordered_set`.
|
93 | 92 |
|
94 | 93 | ### Return Value
|
95 | 94 |
|
96 |
| -**`true`** if the unordered_sets are equal; **`false`** if they are not equal. |
| 95 | +**`true`** if the `unordered_set`s are equal; **`false`** if they are not equal. |
97 | 96 |
|
98 | 97 | ### Remarks
|
99 | 98 |
|
100 |
| -The comparison between unordered_set objects is not affected by the arbitrary order in which they store their elements. Two unordered_sets are equal if they have the same number of elements and the elements in one container are a permutation of the elements in the other container. Otherwise, they are unequal. |
| 99 | +The comparison between `unordered_set` objects is not affected by the arbitrary order in which they store their elements. Two `unordered_set`s are equal if they have the same number of elements and the elements in one container are a permutation of the elements in the other container. Otherwise, they are unequal. |
101 | 100 |
|
102 | 101 | ### Example
|
103 | 102 |
|
@@ -141,29 +140,29 @@ c1 == c3: true
|
141 | 140 | c2 == c3: false
|
142 | 141 | ```
|
143 | 142 |
|
144 |
| -## <a name="op_neq_unordered_multiset"></a> operator!= (multiset) |
| 143 | +## <a name="op_neq_unordered_multiset"></a> `operator!=` (multiset) |
145 | 144 |
|
146 |
| -Tests whether the [unordered_multiset](../standard-library/unordered-multiset-class.md) object on the left side of the operator is not equal to the unordered_multiset object on the right side. |
| 145 | +Tests whether the [`unordered_multiset`](unordered-multiset-class.md) object on the left side of the operator is not equal to the `unordered_multiset` object on the right side. |
147 | 146 |
|
148 | 147 | ```cpp
|
149 | 148 | bool operator!=(const unordered_multiset <Key, Hash, Pred, Allocator>& left, const unordered_multiset <Key, Hash, Pred, Allocator>& right);
|
150 | 149 | ```
|
151 | 150 |
|
152 | 151 | ### Parameters
|
153 | 152 |
|
154 |
| -*left*\ |
| 153 | +*`left`*\ |
155 | 154 | An object of type `unordered_multiset`.
|
156 | 155 |
|
157 |
| -*right*\ |
| 156 | +*`right`*\ |
158 | 157 | An object of type `unordered_multiset`.
|
159 | 158 |
|
160 | 159 | ### Return Value
|
161 | 160 |
|
162 |
| -**`true`** if the unordered_multisets are not equal; **`false`** if they are equal. |
| 161 | +**`true`** if the `unordered_multiset`s are not equal; **`false`** if they are equal. |
163 | 162 |
|
164 | 163 | ### Remarks
|
165 | 164 |
|
166 |
| -The comparison between unordered_multiset objects is not affected by the arbitrary order in which they store their elements. Two unordered_multisets are equal if they have the same number of elements and the elements in one container are a permutation of the elements in the other container. Otherwise, they are unequal. |
| 165 | +The comparison between `unordered_multiset` objects is not affected by the arbitrary order in which they store their elements. Two `unordered_multiset`s are equal if they have the same number of elements and the elements in one container are a permutation of the elements in the other container. Otherwise, they are unequal. |
167 | 166 |
|
168 | 167 | ### Example
|
169 | 168 |
|
@@ -210,29 +209,29 @@ c1 != c3: false
|
210 | 209 | c2 != c3: true
|
211 | 210 | ```
|
212 | 211 |
|
213 |
| -## <a name="op_eq_eq_unordered_multiset"></a> operator== (multiset) |
| 212 | +## <a name="op_eq_eq_unordered_multiset"></a> `operator==` (multiset) |
214 | 213 |
|
215 |
| -Tests whether the [unordered_multiset](../standard-library/unordered-multiset-class.md) object on the left side of the operator is equal to the unordered_multiset object on the right side. |
| 214 | +Tests whether the [`unordered_multiset`](unordered-multiset-class.md) object on the left side of the operator is equal to the `unordered_multiset` object on the right side. |
216 | 215 |
|
217 | 216 | ```cpp
|
218 | 217 | bool operator==(const unordered_multiset <Key, Hash, Pred, Allocator>& left, const unordered_multiset <Key, Hash, Pred, Allocator>& right);
|
219 | 218 | ```
|
220 | 219 |
|
221 | 220 | ### Parameters
|
222 | 221 |
|
223 |
| -*left*\ |
| 222 | +*`left`*\ |
224 | 223 | An object of type `unordered_multiset`.
|
225 | 224 |
|
226 |
| -*right*\ |
| 225 | +*`right`*\ |
227 | 226 | An object of type `unordered_multiset`.
|
228 | 227 |
|
229 | 228 | ### Return Value
|
230 | 229 |
|
231 |
| -**`true`** if the unordered_multisets are equal; **`false`** if they are not equal. |
| 230 | +**`true`** if the `unordered_multiset`s are equal; **`false`** if they are not equal. |
232 | 231 |
|
233 | 232 | ### Remarks
|
234 | 233 |
|
235 |
| -The comparison between unordered_multiset objects is not affected by the arbitrary order in which they store their elements. Two unordered_multisets are equal if they have the same number of elements and the elements in one container are a permutation of the elements in the other container. Otherwise, they are unequal. |
| 234 | +The comparison between `unordered_multiset` objects is not affected by the arbitrary order in which they store their elements. Two `unordered_multiset`s are equal if they have the same number of elements and the elements in one container are a permutation of the elements in the other container. Otherwise, they are unequal. |
236 | 235 |
|
237 | 236 | ### Example
|
238 | 237 |
|
|
0 commit comments