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 >> ;
(desde C++11)

La especialización de plantilla de std::hash para std:: shared_ptr < T > permite a los usuarios obtener hashes de objetos de tipo std:: shared_ptr < T > .

Para un std:: shared_ptr < T > p dado, esta especialización garantiza que std:: hash < std:: shared_ptr < T >> ( ) ( p ) == std:: hash < decltype ( p. get ( ) ) > ( ) ( p. get ( ) ) .

Ejemplo

Véase también

(C++11)
objeto función hash
(plantilla de clase)