[#bsl-multimap-0ae-value_compare]
= xref:bsl.adoc[bsl]::xref:bsl/multimap-0ae.adoc[multimap]::value&lowbar;compare
:relfileprefix: ../../
:mrdocs:

Adaptor that compares `value&lowbar;type` objects by their keys&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;multimap&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class value&lowbar;compare;
----

== Description

This nested class defines a mechanism for comparing two objects of `value&lowbar;type` by adapting an object of (template parameter) type `COMPARATOR`, which compares two objects of (template parameter) type `KEY` &period; Note that this class exactly matches its definition in the C&plus;&plus;11 standard &lsqb;23&period;4&period;4&period;1&rsqb;&semi; otherwise, we would have implemented it as a separate component&hyphen;local class&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:bsl/multimap-0ae/value_compare/first_argument_type.adoc[`first&lowbar;argument&lowbar;type`] 
| Alias for the first argument type of `operator()`&period;
| xref:bsl/multimap-0ae/value_compare/result_type.adoc[`result&lowbar;type`] 
| This `typedef` is an alias for the result type of a call to the overload of `operator()` (the comparison function) provided by a `multimap&colon;&colon;value&lowbar;compare` object&period;
| xref:bsl/multimap-0ae/value_compare/second_argument_type.adoc[`second&lowbar;argument&lowbar;type`] 
| Alias for the second argument type of `operator()`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/multimap-0ae/value_compare/operator_call.adoc[`operator()`] 
| Return whether `x` is ordered before `y` by key&period;
|===


== Protected Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/multimap-0ae/value_compare/2constructor.adoc[`value&lowbar;compare`]         [.small]#[constructor]#
| Create a `value&lowbar;compare` object that uses `comparator`&period;
|===


== Protected Data Members

[cols="1,4"]
|===
| Name| Description
| xref:bsl/multimap-0ae/value_compare/comp.adoc[`comp`] 
| Key comparator stored in each node&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/multimap-0ae.adoc[bsl::multimap]`
| Ordered associative container mapping keys to values, allowing duplicates&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
