Fix exception bug in asssignment.

The hash and key equality functions were assigned before allocating new
buckets. If that allocation failed, then the existing elements would be
left in place - so if accessed after the exception they could be in the
wrong buckets or equivalent elements could be incorrectly grouped
together.
This commit is contained in:
Daniel James
2016-10-02 13:04:25 +01:00
parent 588ad6e69f
commit e7b20d2877
5 changed files with 159 additions and 6 deletions
+1
View File
@@ -72,6 +72,7 @@ test-suite unordered-exception
[ run exception/constructor_exception_tests.cpp framework ]
[ run exception/copy_exception_tests.cpp framework ]
[ run exception/assign_exception_tests.cpp framework ]
[ run exception/move_assign_exception_tests.cpp framework ]
[ run exception/insert_exception_tests.cpp framework ]
[ run exception/erase_exception_tests.cpp framework ]
[ run exception/rehash_exception_tests.cpp framework ]