30 lines
978 B
Markdown
30 lines
978 B
Markdown
[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.19 Class 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)
|