◐ Shell
clean mode source ↗

std::hash – cppreference.com

Aus cppreference.com

<metanoindex/>

<tbody> </tbody>

template<class T> struct hash<shared_ptr<T>>;

(seit C++11)

Die Vorlage Spezialisierung std::hash für std::shared_ptr<T> ermöglicht es Benutzern, Hashes von Objekten des Typs std::shared_ptr<T> zu erhalten .

Original:

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

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Für eine gegebene std::shared_ptr<T> p sorgt diese Spezialisierung dass std::hash<std::shared_ptr<T>>()(p) == std::hash<T*>()(p.get()) .

Original:

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

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Beispiel

Siehe auch

Funktionsobjekt zur Erzeugung von Hashwerten
(Klassen-Template) [edit]