Fixes #75 ("Bug: Rehashing an empty unordered_set with cache_begin set to true hits an assert")

This commit is contained in:
Ion Gaztañaga committed 2022-06-25 18:32:27 +02:00
1 parent 05bb58091e
commit 27c00ae498
2 files changed
+21 -7

No files matched your search

+8
View File
@@ -635,6 +635,14 @@ void test_unordered<ContainerDefiner>::test_rehash(value_cont_type& values, deta
testset1.full_rehash();
{ int init_values [] = { 1, 2, 2, 3, 4, 5 };
TEST_INTRUSIVE_SEQUENCE_MAYBEUNIQUE( init_values, testset1 ); }
//Test empty rehash
testset1.clear();
testset1.rehash(bucket_traits(
pointer_traits<bucket_ptr>::pointer_to(buckets1[0]), sizeof(buckets1) / sizeof(*buckets1)));
BOOST_TEST(testset1.empty());
testset1.full_rehash();
BOOST_TEST(testset1.empty());
}
//test: find, equal_range (lower_bound, upper_bound):