[#BloombergLP-bslstl-MapComparator] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::MapComparator :relfileprefix: ../../ :mrdocs: This class compares map keys with `TreeNode` objects using `COMPARATOR`. == Synopsis Declared in `<bslstl_mapcomparator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class VALUE, class COMPARATOR> class MapComparator; ---- == Description This class overloads the function‐call operator to compare a referenced `bslalg::RbTreeNode` object with a object of the parameterized `KEY` type, assuming the reference to `bslalg::RbTreeNode` is a base of a `bslstl::TreeNode` holding a `pair<KEY, VALUE>`, using a functor of the parameterized `COMPARATOR` type. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/MapComparator/NodeType.adoc[`NodeType`] | This alias represents the type of node holding a `ValueType` object. | xref:BloombergLP/bslstl/MapComparator/ValueType.adoc[`ValueType`] | This alias represents the type of the values held by nodes in an `bslalg::RbTree` object. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/MapComparator/2constructor-08.adoc[`MapComparator`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bslstl/MapComparator/keyComparator-05.adoc[`keyComparator`] | `keyComparator` overloads | xref:BloombergLP/bslstl/MapComparator/operator_call-00f.adoc[`operator()`] | Function call operators | xref:BloombergLP/bslstl/MapComparator/swap.adoc[`swap`] | Efficiently exchange the value of this object with the value of the specified `other` object. This method provides the no‐throw exception‐safety guarantee. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/swap-015.adoc[`swap`] | Efficiently exchange the values of the specified `a` and `b` objects. This function provides the no‐throw exception‐safety guarantee. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#