mirror of
https://github.com/boostorg/unordered.git
synced 2025-10-05 04:01:03 +02:00
Update tests for standard changes involving bucket count.
It seems my defect report was accepted at some point, and they tweaked the requirements involving bucket counts. This also makes it possible to have a bucket count of 0, which I think wasn't allowed in the past. I don't think I'll change this implementation to do so, but I'd like to be able to run these tests against standard implementations, so I'm starting to take that into account. I believe these changes were made after the C++14 standard, but I've always been tracking the draft standards, so that doesn't really matter.
This commit is contained in:
@@ -130,6 +130,7 @@ struct insert_test_rehash1 : public insert_test_base<T>
|
||||
|
||||
T x;
|
||||
x.max_load_factor(0.25);
|
||||
// TODO: This doesn't really work is bucket_count is 0
|
||||
size_type bucket_count = x.bucket_count();
|
||||
size_type initial_elements = static_cast<size_type>(
|
||||
ceil(bucket_count * (double) x.max_load_factor()) - 1);
|
||||
|
Reference in New Issue
Block a user