Namespaces
Variants
Views
Actions

std::hash

From cppreference.com
 
 
 
 
 
template<class T, class Deleter> struct hash<unique_ptr<T, Deleter>>;
(since C++11)

The template specialization of std::hash for std::unique_ptr<T, Deleter> allows users to obtain hashes of objects of type std::unique_ptr<T, Deleter>.

For a given std::unique_ptr<T, Deleter> p, this specialization ensures that std::hash<std::unique_ptr<T, Deleter>>()(p) == std::hash<T*>()(p.get()).

[edit] Example

[edit] See also

(C++11)
hash function object
(class template) [edit]