Skip to content

Commit 817c556

Browse files
committed
Version 2.2.1
1 parent 901a5c9 commit 817c556

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Hashmap.hpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
namespace LouiEriksson {
4141

4242
/**
43-
* @mainpage Version 2.2.0
43+
* @mainpage Version 2.2.1
4444
* @details Custom Hashmap implementation accepting a customisable key and value type.
4545
* This implementation requires that your "key" type is compatible with std::hash and that the stored data types are copyable.
4646
* @see Wang, Q. (Harry) (2020). Implementing Your Own HashMap (Explanation + Code). YouTube.
@@ -131,7 +131,14 @@ namespace LouiEriksson {
131131

132132
for (auto& bucket : shallow_cpy) {
133133
for (auto& kvp : bucket) {
134-
Assign(std::move(kvp.first), std::move(kvp.second));
134+
135+
std::exception_ptr e_ptr = nullptr;
136+
137+
Assign(std::move(kvp.first), std::move(kvp.second), nullptr);
138+
139+
if (e_ptr != nullptr) {
140+
std::rethrow_exception(e_ptr);
141+
}
135142
}
136143
}
137144
}

0 commit comments

Comments
 (0)