Releases: Tessil/robin-map
Releases · Tessil/robin-map
v1.3.0
v1.2.2
v1.2.1
v1.2.0
This release fixes a rare but critical bug which only occurs when a very long collision chain (> 32 767) occurs due to a poor hash function, see first bullet point. Upgrade is recommended.
- Keep rehashing if
dist_from_ideal_bucket
is >DIST_FROM_IDEAL_BUCKET_LIMIT
during insertion (fix issue #52)- During insertion a check was done on
dist_from_ideal_bucket
to be sure it doesn't becomes bigger thanDIST_FROM_IDEAL_BUCKET_LIMIT
but this was only done during the robin swap. A check should also be done beforehand if we find an empty bucket otherwise the variable could overflow and lead to bugs. This commit adds this check. - The bug should only manifest itself if the collision chain becomes larger than 32 767 due to a very poor hash function.
- During insertion a check was done on
- Disable CMake install rule if robin_map is used as subproject (#60)
- Replace deprecated
std::aligned_storage
since C++23 byalignas
(#61) - Raise
DIST_FROM_IDEAL_BUCKET_LIMIT
to 8192 - Clear and shrink the moved hash table in the move operator to be coherent with the move constructor
- When using C++17,
std::launder
the reinterpreted pointer fromstd::aligned_storage
to adapt to the change of object model introduced in P0137R1. Fix potential but very unlikely undefined behaviour.- C++17 introduced a change in the object model with P0137R1 which now requires the reinterpreted pointer from
std::aligned_storage
to be laundered. See the following discussion for some details https://stackoverflow.com/questions/47735657/does-reinterpret-casting-stdaligned-storage-to-t-without-stdlaunder-violat
- C++17 introduced a change in the object model with P0137R1 which now requires the reinterpreted pointer from
- When exceptions are disabled, only print the error message when
defined(TSL_DEBUG)
instead of!defined(NDEBUG)
- Check that bucket_count doesn't exceed max_bucket_count() after the constructor initialization
- max_bucket_count() method relies on m_buckets_data which needs to be properly initialized first
v1.0.1
v1.0.0
- Add support for efficient serialization (#36)
- Remove compilation warnings when -Wshadow flag is set (#41)
- Fix USE_STORED_HASH_ON_REHASH to return true when bucket_count is 0, STORE_HASH is true and is_power_of_two_policy::value is true.
This commit doesn't change the actual behaviour of the map as even when USE_STORED_HASH_ON_REHASH was returning false on empty map rehashes, no stored hashes were used as the map was empty. - Fix CMake warning by specifying a project language before including GNUInstallDirs
- Create a local tsl-robin-mapTargets.cmake (#45)
v0.6.3
- Fix issue #26, raise the maximum possible size of the hash table when using the
prime_growth_policy
on a 64-bit platform. - Fix issue #31, when
min_load_factor()
> 0, theclear()
method will also reset thebucket_count
of the hash table to 0. - Fix shrink when
min_load_factor
is set and a range erase withend()
aslast
is called. Them_try_skrink_on_next_insert
was not correctly set. - Fix issue #33, the value function of a
const iterator
can now be called and returns a mutable reference to the underlyingvalue_type
.
v0.6.2
- Fix compilation error for move-only types with a throwing move constructor/operator (#14).
- Add support for min_load_factor (#17).
- Fix compilation error when exceptions are disabled and C++ 14 or higher is used (#18).
- Fix issue #23. The
distance_type
used to store the distance of a value in a bucket from its ideal bucket could overflow when a lot of collisions happened and theload_factor()
stayed belowREHASH_ON_HIGH_NB_PROBES__MIN_LOAD_FACTOR
. We now rehash no matter the load factor if the distance becomes too high. - Add
bool contains(...)
methods.
v0.6.1
v0.6.0
- Rename CMake project name from
tsl_robin_map
totsl-robin-map
for coherence with the convention used by most package managers. Thefind_package(tsl-robin-map)
command must now be used instead of thefind_package(tsl_robin_map)
. - Set bucket count for default constructed map/set to 0 to avoid any allocation.
- On Windows, add
tsl-robin-map.natvis
to the installed files. - Fix CMake >= 3.13 warning on Policy CMP0076 and add quotes to paths.
- Remove
cxx_std_11
fromtarget_compile_features
to avoid a warning with older versions of CMake that don't support it. The warning was given even if thetarget_compile_features
was surrounded in aif(${CMAKE_VERSION} VERSION_GREATER "3.7")
. - Change error message when
max_bucket_count
is reached. It's the maximum bucket count that has been reached and not the size.