From 090af1b8097fecf6b09f3048811a44e11ece3242 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 3 Apr 2025 06:07:34 -0500 Subject: Test hash map extract pair, fix bugs. --- include/fud_hash_map_impl.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/fud_hash_map_impl.hpp') diff --git a/include/fud_hash_map_impl.hpp b/include/fud_hash_map_impl.hpp index 6e224f9..23f5653 100644 --- a/include/fud_hash_map_impl.hpp +++ b/include/fud_hash_map_impl.hpp @@ -151,7 +151,13 @@ struct MapEntry { return *std::bit_cast(m_valueData.data()); } - [[nodiscard]] Value&& takeValue() & + [[nodiscard]] constexpr Key&& takeKey() & + { + fudAssert(hasValue()); + return std::move(*std::bit_cast(m_keyData.data())); + } + + [[nodiscard]] constexpr Value&& takeValue() & { fudAssert(hasValue()); return std::move(*std::bit_cast(m_valueData.data())); -- cgit v1.2.3