共用方式為


hash_map::key_compare

A type that provides a function object that can compare two sort keys to determine the relative order of two elements in the map.

typedef Traits key_compare;

Remarks

key_compare is a synonym for the template parameter Traits.

For more information on Traits see the hash_map Class topic.

In Visual C++ .NET 2003, members of the <hash_map> and <hash_set> header files are no longer in the std namespace, but rather have been moved into the stdext namespace. See The stdext Namespace for more information.

Example

See example for key_comp for an example of how to declare and use key_compare.

Requirements

Header: <hash_map>

Namespace: stdext

See Also

Reference

hash_map Class

Standard Template Library

Other Resources

hash_map Members