Share via


hash_set::key_compare

Note

This API is obsolete. The alternative is unordered_set Class.

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

typedef Traits key_compare;

Remarks

key_compare is a synonym for the template parameter Traits.

For more information on Traits see the hash_set Class topic.

Note that both key_compare and value_compare are synonyms for the template parameter Traits. Both types are provided for the set and multiset classes, where they are identical, for compatibility with the map and multimap classes, where they are distinct.

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 the example for key_comp for an example of how to declare and use key_compare.

Requirements

Header: <hash_set>

Namespace: stdext

See Also

Reference

hash_set Class

Standard Template Library