Files
2025-10-25 03:02:53 +03:00

30 lines
978 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[indirect.hash]
# 20 Memory management library [[mem]](./#mem)
## 20.4 Types for composite class design [[mem.composite.types]](mem.composite.types#indirect.hash)
### 20.4.1 Class template indirect [[indirect]](indirect#hash)
#### 20.4.1.10 Hash support [indirect.hash]
[🔗](#lib:hash,indirect)
`template<class T, class Allocator>
struct hash<indirect<T, Allocator>>;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L6740)
The specialization hash<indirect<T, Allocator>> is enabled ([[unord.hash]](unord.hash "22.10.19Class template hash")) if and only if hash<T> is enabled[.](#1.sentence-1)
When enabled for an object i of type indirect<T, Allocator>,hash<indirect<T, Allocator>>()(i) evaluates to
either the same value as hash<T>()(*i),
if i is not valueless;
otherwise to animplementation-defined
value[.](#1.sentence-2)
The member functions are not guaranteed to be noexcept[.](#1.sentence-3)