From 0d52b228b7cea0b234dd55d2fe9b0b074cfbed5f Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:40:07 +0800 Subject: [PATCH 1/4] Fix invalid `std::` prefix for `public` keyword in `value_compare` class reference --- docs/standard-library/value-compare-class.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/standard-library/value-compare-class.md b/docs/standard-library/value-compare-class.md index 9777faa45ae..b4cc44b5dbf 100644 --- a/docs/standard-library/value-compare-class.md +++ b/docs/standard-library/value-compare-class.md @@ -14,7 +14,7 @@ Provides a function object that can compare the elements of a hash_map by compar ```cpp class value_compare - : std::public binary_function + : public binary_function { public: bool operator()( From 0c929e06fb010132c9f2977f399d7ca8d1f782e9 Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:45:07 +0800 Subject: [PATCH 2/4] Add backticks in `value_compare` class reference --- docs/standard-library/value-compare-class.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/standard-library/value-compare-class.md b/docs/standard-library/value-compare-class.md index b4cc44b5dbf..c0878dac103 100644 --- a/docs/standard-library/value-compare-class.md +++ b/docs/standard-library/value-compare-class.md @@ -6,9 +6,9 @@ f1_keywords: ["hash_map/std::value_compare"] helpviewer_keywords: ["value_compare class"] ms.assetid: c306c5b9-3505-4357-aa6b-216451b951ed --- -# value_compare Class +# `value_compare` Class -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. +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`. ## Syntax @@ -32,22 +32,22 @@ protected: ## Remarks -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. +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. -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. +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. ## Example -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. +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`. ## Requirements -**Header:** \ +**Header:** `` -**Namespace:** stdext +**Namespace:** `stdext` ## See also -[binary_function Struct](../standard-library/binary-function-struct.md)\ +[`binary_function` Struct](../standard-library/binary-function-struct.md)\ [Thread Safety in the C++ Standard Library](../standard-library/thread-safety-in-the-cpp-standard-library.md)\ [C++ Standard Library Reference](../standard-library/cpp-standard-library-reference.md) From 02037fbae27755372bc332bd89ef1da14a1f44b3 Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:47:23 +0800 Subject: [PATCH 3/4] Simplify redundant relative links in `value_compare` class reference --- docs/standard-library/value-compare-class.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/standard-library/value-compare-class.md b/docs/standard-library/value-compare-class.md index c0878dac103..bf76bbbc0ba 100644 --- a/docs/standard-library/value-compare-class.md +++ b/docs/standard-library/value-compare-class.md @@ -38,7 +38,7 @@ For `hash_set`s and `hash_multiset`s, which are simple containers where the key ## Example -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`. +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`. ## Requirements @@ -48,6 +48,6 @@ See the example for [`hash_map::value_comp`](../standard-library/hash-map-class. ## See also -[`binary_function` Struct](../standard-library/binary-function-struct.md)\ -[Thread Safety in the C++ Standard Library](../standard-library/thread-safety-in-the-cpp-standard-library.md)\ -[C++ Standard Library Reference](../standard-library/cpp-standard-library-reference.md) +[`binary_function` Struct](binary-function-struct.md)\ +[Thread Safety in the C++ Standard Library](thread-safety-in-the-cpp-standard-library.md)\ +[C++ Standard Library Reference](cpp-standard-library-reference.md) From 2a713d653de1655f523f468fd3963f5c672dde5b Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:48:05 +0800 Subject: [PATCH 4/4] Update metadata in `value_compare` class reference --- docs/standard-library/value-compare-class.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/standard-library/value-compare-class.md b/docs/standard-library/value-compare-class.md index bf76bbbc0ba..18f66856546 100644 --- a/docs/standard-library/value-compare-class.md +++ b/docs/standard-library/value-compare-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: value_compare Class" title: "value_compare Class" -ms.date: "11/04/2016" +description: "Learn more about: value_compare Class" +ms.date: 11/04/2016 f1_keywords: ["hash_map/std::value_compare"] helpviewer_keywords: ["value_compare class"] -ms.assetid: c306c5b9-3505-4357-aa6b-216451b951ed --- # `value_compare` Class