[#bsl-multiset-03-key_comp]
= xref:bsl.adoc[bsl]::xref:bsl/multiset-03.adoc[multiset]::key&lowbar;comp
:relfileprefix: ../../
:mrdocs:

Return the key&hyphen;comparison functor (or function pointer) used by this multiset&semi; if a comparator was supplied at construction, return its value, otherwise return a default constructed `key&lowbar;compare` object&period; Note that this comparator compares objects of type `KEY`, which is the type of the `value&lowbar;type` objects contained in this multiset&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/multiset-03/key_compare.adoc[multiset&lt;KEY, COMPARATOR, ALLOCATOR&gt;::key&lowbar;compare]
key&lowbar;comp() const;
----


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