Namespaces
Variants

std:: hash <std::shared_ptr>

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
template < class T >
struct hash < std:: shared_ptr < T >> ;
(depuis C++11)

La spécialisation de modèle de std::hash pour std:: shared_ptr < T > permet aux utilisateurs d'obtenir des hachages d'objets de type std:: shared_ptr < T > .

Pour un std:: shared_ptr < T > p donné, cette spécialisation garantit que std:: hash < std:: shared_ptr < T >> ( ) ( p ) == std:: hash < decltype ( p. get ( ) ) > ( ) ( p. get ( ) ) .

Exemple

Voir aussi

(C++11)
objet fonction de hachage
(modèle de classe)