|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <memory> | ||
template<class T,class Allocator> struct hash<std::indirect<T, Allocator>>; | (since C++26) | |
The partial specialization ofstd::hash forstd::indirect allows users to obtain hashes of the objects owned byindirect objects.
The specializationstd::hash<std::indirect<T, Allocator>> isenabled ifstd::hash<T> is enabled, and is disabled otherwise.
When enabled, for an objectobj of typestd::indirect<T, Allocator>,std::hash<std::indirect<T, Allocator>>()(obj) evaluates to:
The member functions of this specialization are not guaranteed to benoexcept because the hash ofT might throw.
| This section is incomplete Reason: no example |
(C++11) | hash function object (class template)[edit] |