Skip to content

Commit 1a7e1a4

Browse files
authored
Merge pull request #5553 from Rageking8/fix-invalid-std-prefix-for-public-keyword-and-update-value-compare-class-reference
Fix invalid `std::` prefix for `public` keyword and update `value_compare` class reference
2 parents fc1ac7b + 2a713d6 commit 1a7e1a4

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
---
2-
description: "Learn more about: value_compare Class"
32
title: "value_compare Class"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: value_compare Class"
4+
ms.date: 11/04/2016
55
f1_keywords: ["hash_map/std::value_compare"]
66
helpviewer_keywords: ["value_compare class"]
7-
ms.assetid: c306c5b9-3505-4357-aa6b-216451b951ed
87
---
9-
# value_compare Class
8+
# `value_compare` Class
109

11-
Provides a function object that can compare the elements of a hash_map by comparing the values of their keys to determine their relative order in the hash_map.
10+
Provides a function object that can compare the elements of a `hash_map` by comparing the values of their keys to determine their relative order in the `hash_map`.
1211

1312
## Syntax
1413

1514
```cpp
1615
class value_compare
17-
: std::public binary_function<value_type, value_type, bool>
16+
: public binary_function<value_type, value_type, bool>
1817
{
1918
public:
2019
bool operator()(
@@ -32,22 +31,22 @@ protected:
3231

3332
## Remarks
3433

35-
The comparison criteria provided by value_compare between `value_types` of whole elements contained by a hash_map is induced from a comparison between the keys of the respective elements by the auxiliary class construction. The member function operator uses the object `comp` of type `key_compare` stored in the function object provided by value_compare to compare the sort-key components of two elements.
34+
The comparison criteria provided by `value_compare` between `value_types` of whole elements contained by a `hash_map` is induced from a comparison between the keys of the respective elements by the auxiliary class construction. The member function operator uses the object `comp` of type `key_compare` stored in the function object provided by `value_compare` to compare the sort-key components of two elements.
3635

37-
For hash_sets and hash_multisets, which are simple containers where the key values are identical to the element values, value_compare is equivalent to `key_compare`; for hash_maps and hash_multimaps they are not, because the value of the type `pair` elements is not identical to the value of the element's key.
36+
For `hash_set`s and `hash_multiset`s, which are simple containers where the key values are identical to the element values, `value_compare` is equivalent to `key_compare`; for `hash_map`s and `hash_multimap`s they are not, because the value of the type `pair` elements is not identical to the value of the element's key.
3837

3938
## Example
4039

41-
See the example for [hash_map::value_comp](../standard-library/hash-map-class.md#value_comp) for an example of how to declare and use value_compare.
40+
See the example for [`hash_map::value_comp`](hash-map-class.md#value_comp) for an example of how to declare and use `value_compare`.
4241

4342
## Requirements
4443

45-
**Header:** \<hash_map>
44+
**Header:** `<hash_map>`
4645

47-
**Namespace:** stdext
46+
**Namespace:** `stdext`
4847

4948
## See also
5049

51-
[binary_function Struct](../standard-library/binary-function-struct.md)\
52-
[Thread Safety in the C++ Standard Library](../standard-library/thread-safety-in-the-cpp-standard-library.md)\
53-
[C++ Standard Library Reference](../standard-library/cpp-standard-library-reference.md)
50+
[`binary_function` Struct](binary-function-struct.md)\
51+
[Thread Safety in the C++ Standard Library](thread-safety-in-the-cpp-standard-library.md)\
52+
[C++ Standard Library Reference](cpp-standard-library-reference.md)

0 commit comments

Comments
 (0)