Skip to content

Commit 1b8a92e

Browse files
committed
feat(hash): update links
1 parent f89163e commit 1b8a92e

File tree

1 file changed

+41
-23
lines changed
  • src/content/docs/cpp/library/utility

1 file changed

+41
-23
lines changed

src/content/docs/cpp/library/utility/hash.mdx

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,42 @@ import { Card } from "@astrojs/starlight/components";
1616
import FlexTable from "@components/FlexTable.astro";
1717

1818
<Card title="Defined in header">
19-
<FlexTable>
20-
<CppHeader name="bitset" />
21-
<CppHeader name="coroutine" />
22-
<CppHeader name="chrono" />
23-
<CppHeader name="filesystem" />
24-
<CppHeader name="functional" />
25-
<CppHeader name="memory" />
26-
<CppHeader name="optional" />
27-
<CppHeader name="stacktrace" />
28-
<CppHeader name="string" />
29-
<CppHeader name="string_view" />
30-
<CppHeader name="system_error" />
31-
<CppHeader name="text_encoding" />
32-
<CppHeader name="thread" />
33-
<CppHeader name="typeindex" />
34-
<CppHeader name="variant" />
35-
<CppHeader name="vector" />
36-
</FlexTable>
19+
<table>
20+
<tbody>
21+
<tr>
22+
<td><CppHeader name="bitset" /></td>
23+
<td><CppHeader name="coroutine" /></td>
24+
</tr>
25+
<tr>
26+
<td><CppHeader name="chrono" /></td>
27+
<td><CppHeader name="filesystem" /></td>
28+
</tr>
29+
<tr>
30+
<td><CppHeader name="functional" /></td>
31+
<td><CppHeader name="memory" /></td>
32+
</tr>
33+
<tr>
34+
<td><CppHeader name="optional" /></td>
35+
<td><CppHeader name="stacktrace" /></td>
36+
</tr>
37+
<tr>
38+
<td><CppHeader name="string" /></td>
39+
<td><CppHeader name="string_view" /></td>
40+
</tr>
41+
<tr>
42+
<td><CppHeader name="system_error" /></td>
43+
<td><CppHeader name="text_encoding" /></td>
44+
</tr>
45+
<tr>
46+
<td><CppHeader name="thread" /></td>
47+
<td><CppHeader name="typeindex" /></td>
48+
</tr>
49+
<tr>
50+
<td><CppHeader name="variant" /></td>
51+
<td><CppHeader name="vector" /></td>
52+
</tr>
53+
</tbody>
54+
</table>
3755
</Card>
3856

3957

@@ -56,10 +74,10 @@ Given a type `Key`, each specialization `std::hash<Key>` is either _enabled_ or
5674
- If `std::hash<Key>` is not provided by the program or the user, it is disabled.
5775
- Otherwise, `std::hash<Key>` is enabled if all following conditions are satisfied:
5876
- All following requirements are satisfied:
59-
- <DocLink dest="/cpp/language/named_req/Hash"> `Hash` </DocLink> (with `Key` as the function call argument type)
60-
- <DocLink dest="/cpp/language/named_req/DefaultConstructible"> `DefaultConstructible` </DocLink>
61-
- [CopyAssignable](../named_req/CopyAssignable.html "cpp/named req/CopyAssignable")
62-
- [Swappable](../named_req/Swappable.html "cpp/named req/Swappable")
77+
- <DocLink dest="/cpp/language/named_req/hash"> _Hash_ </DocLink> (with `Key` as the function call argument type)
78+
- <DocLink dest="/cpp/language/named_req/default-constructible"> _DefaultConstructible_ </DocLink>
79+
- <DocLink dest="/cpp/language/named_req/copy-assignable"> _CopyAssignable_ </DocLink>
80+
- <DocLink dest="/cpp/language/named_req/swappable"> _Swappable_ </DocLink>
6381

6482
- Given the following values:
6583
- `h`, an object of type `std::hash<Key>`.
@@ -210,7 +228,7 @@ int main()
210228

211229
Possible outputs:
212230

213-
```cpp
231+
```
214232
hash("Meet the new boss...") = 10656026664466977650
215233
hash("Hubert", "Farnsworth") = 12922914235676820612 (using MyHash) or
216234
12922914235676820612 (using injected specialization)

0 commit comments

Comments
 (0)