From Jason Turner

[unord.hash]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpjbu90o49/{from.md → to.md} +17 -17
tmp/tmpjbu90o49/{from.md → to.md} RENAMED
@@ -1,16 +1,16 @@
1
  ### Class template `hash` <a id="unord.hash">[[unord.hash]]</a>
2
 
3
  The unordered associative containers defined in [[unord]] use
4
- specializations of the class template `hash` ([[functional.syn]]) as
5
- the default hash function.
6
 
7
  Each specialization of `hash` is either enabled or disabled, as
8
  described below.
9
 
10
- [*Note 1*: Enabled specializations meet the requirements of `Hash`, and
11
- disabled specializations do not. — *end note*]
12
 
13
  Each header that declares the template `hash` provides enabled
14
  specializations of `hash` for `nullptr_t` and all cv-unqualified
15
  arithmetic, enumeration, and pointer types. For any type `Key` for which
16
  neither the library nor the user provides an explicit or partial
@@ -22,25 +22,25 @@ and its member functions are `noexcept` except as noted otherwise.
22
 
23
  If `H` is a disabled specialization of `hash`, these values are `false`:
24
  `is_default_constructible_v<H>`, `is_copy_constructible_v<H>`,
25
  `is_move_constructible_v<H>`, `is_copy_assignable_v<H>`, and
26
  `is_move_assignable_v<H>`. Disabled specializations of `hash` are not
27
- function object types ([[function.objects]]).
28
 
29
  [*Note 2*: This means that the specialization of `hash` exists, but any
30
- attempts to use it as a `Hash` will be ill-formed. — *end note*]
31
 
32
  An enabled specialization `hash<Key>` will:
33
 
34
- - satisfy the `Hash` requirements ([[hash.requirements]]), with `Key`
35
- as the function call argument type, the `DefaultConstructible`
36
- requirements (Table  [[tab:defaultconstructible]]), the
37
- `CopyAssignable` requirements (Table  [[tab:copyassignable]]),
38
- - be swappable ([[swappable.requirements]]) for lvalues,
39
- - satisfy the requirement that if `k1 == k2` is `true`, `h(k1) == h(k2)`
40
- is also `true`, where `h` is an object of type `hash<Key>` and `k1`
41
- and `k2` are objects of type `Key`;
42
- - satisfy the requirement that the expression `h(k)`, where `h` is an
43
  object of type `hash<Key>` and `k` is an object of type `Key`, shall
44
- not throw an exception unless `hash<Key>` is a user-defined
45
- specialization that depends on at least one user-defined type.
46
 
 
1
  ### Class template `hash` <a id="unord.hash">[[unord.hash]]</a>
2
 
3
  The unordered associative containers defined in [[unord]] use
4
+ specializations of the class template `hash` [[functional.syn]] as the
5
+ default hash function.
6
 
7
  Each specialization of `hash` is either enabled or disabled, as
8
  described below.
9
 
10
+ [*Note 1*: Enabled specializations meet the *Cpp17Hash* requirements,
11
+ and disabled specializations do not. — *end note*]
12
 
13
  Each header that declares the template `hash` provides enabled
14
  specializations of `hash` for `nullptr_t` and all cv-unqualified
15
  arithmetic, enumeration, and pointer types. For any type `Key` for which
16
  neither the library nor the user provides an explicit or partial
 
22
 
23
  If `H` is a disabled specialization of `hash`, these values are `false`:
24
  `is_default_constructible_v<H>`, `is_copy_constructible_v<H>`,
25
  `is_move_constructible_v<H>`, `is_copy_assignable_v<H>`, and
26
  `is_move_assignable_v<H>`. Disabled specializations of `hash` are not
27
+ function object types [[function.objects]].
28
 
29
  [*Note 2*: This means that the specialization of `hash` exists, but any
30
+ attempts to use it as a *Cpp17Hash* will be ill-formed. — *end note*]
31
 
32
  An enabled specialization `hash<Key>` will:
33
 
34
+ - meet the *Cpp17Hash* requirements ([[cpp17.hash]]), with `Key` as the
35
+ function call argument type, the *Cpp17DefaultConstructible*
36
+ requirements ([[cpp17.defaultconstructible]]), the
37
+ *Cpp17CopyAssignable* requirements ([[cpp17.copyassignable]]),
38
+ - be swappable [[swappable.requirements]] for lvalues,
39
+ - meet the requirement that if `k1 == k2` is `true`, `h(k1) == h(k2)` is
40
+ also `true`, where `h` is an object of type `hash<Key>` and `k1` and
41
+ `k2` are objects of type `Key`;
42
+ - meet the requirement that the expression `h(k)`, where `h` is an
43
  object of type `hash<Key>` and `k` is an object of type `Key`, shall
44
+ not throw an exception unless `hash<Key>` is a program-defined
45
+ specialization that depends on at least one program-defined type.
46