summaryrefslogtreecommitdiff
path: root/include/fud_hash_map_impl.hpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2025-04-02 06:43:43 -0500
committerDominick Allen <djallen@librehumanitas.org>2025-04-02 06:43:43 -0500
commite6d9330a978373ffc24209b5edf03eda6491f818 (patch)
tree9f24009ef6645263d9eb92bb338c69bd23d9afd5 /include/fud_hash_map_impl.hpp
parent1d2ad781398d2a8743899eb54153998ca03ac090 (diff)
Add more testing for hash maps.
Diffstat (limited to 'include/fud_hash_map_impl.hpp')
-rw-r--r--include/fud_hash_map_impl.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/fud_hash_map_impl.hpp b/include/fud_hash_map_impl.hpp
index e4b79c4..6e224f9 100644
--- a/include/fud_hash_map_impl.hpp
+++ b/include/fud_hash_map_impl.hpp
@@ -151,6 +151,12 @@ struct MapEntry {
return *std::bit_cast<Value*>(m_valueData.data());
}
+ [[nodiscard]] Value&& takeValue() &
+ {
+ fudAssert(hasValue());
+ return std::move(*std::bit_cast<Value*>(m_valueData.data()));
+ }
+
constexpr void tombstone() noexcept
{
destroy(true);