From Jason Turner

[optional.hash]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpb4wm13tx/{from.md → to.md} +14 -0
tmp/tmpb4wm13tx/{from.md → to.md} RENAMED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Hash support <a id="optional.hash">[[optional.hash]]</a>
2
+
3
+ ``` cpp
4
+ template <class T> struct hash<optional<T>>;
5
+ ```
6
+
7
+ The specialization `hash<optional<T>>` is enabled ([[unord.hash]]) if
8
+ and only if `hash<remove_const_t<T>>` is enabled. When enabled, for an
9
+ object `o` of type `optional<T>`, if `bool(o) == true`, then
10
+ `hash<optional<T>>()(o)` shall evaluate to the same value as
11
+ `hash<remove_const_t<T>>()(*o)`; otherwise it evaluates to an
12
+ unspecified value. The member functions are not guaranteed to be
13
+ `noexcept`.
14
+