diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/uuid.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/uuid.h b/src/common/uuid.h index aeb36939a..2353179d8 100644 --- a/src/common/uuid.h +++ b/src/common/uuid.h | |||
| @@ -69,3 +69,14 @@ struct UUID { | |||
| 69 | static_assert(sizeof(UUID) == 16, "UUID is an invalid size!"); | 69 | static_assert(sizeof(UUID) == 16, "UUID is an invalid size!"); |
| 70 | 70 | ||
| 71 | } // namespace Common | 71 | } // namespace Common |
| 72 | |||
| 73 | namespace std { | ||
| 74 | |||
| 75 | template <> | ||
| 76 | struct hash<Common::UUID> { | ||
| 77 | size_t operator()(const Common::UUID& uuid) const noexcept { | ||
| 78 | return uuid.uuid[1] ^ uuid.uuid[0]; | ||
| 79 | } | ||
| 80 | }; | ||
| 81 | |||
| 82 | } // namespace std | ||