# std::map<Key,T,Compare,Allocator>::key_comp

From cppreference.com
< cpp‎ | container‎ | map

key_compare key_comp() const; |  |

Returns the function object that compares the keys, which is a copy of this container's constructor argument `comp`.

### Parameters

(none)

### Return value

The key comparison function object.

### Complexity

Constant.

### See also

value_comp | returns the function that compares keys in objects of type value_type (public member function)

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/container/map/key_comp&oldid=50561"