Skip to content

Releases: Tessil/robin-map

v1.3.0

20 Apr 18:20
Compare
Choose a tag to compare
  • Add erase_fast(iterator pos) method which in contrast to erase(iterator pos) doesn't return an iterator, avoiding the cost of looking for the next element after erasure of the element at iterator pos.

v1.2.2

19 Mar 21:38
Compare
Choose a tag to compare
  • Specify library version & versioning rules in headers
  • Mark error_message in numeric_cast as unused to avoid compiler warning in some cases
  • Remove support for CMake < 3.3

v1.2.1

05 Jan 23:10
Compare
Choose a tag to compare
  • Fix missing project version increment in CMake (d37a410)

v1.2.0

05 Jan 22:57
Compare
Choose a tag to compare

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 than DIST_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.
  • Disable CMake install rule if robin_map is used as subproject (#60)
  • Replace deprecated std::aligned_storage since C++23 by alignas (#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 from std::aligned_storage to adapt to the change of object model introduced in P0137R1. Fix potential but very unlikely undefined behaviour.
  • 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

05 Apr 17:56
784245b
Compare
Choose a tag to compare

Minor release to fix tests compilation on some platforms, no change in the library code itself.

  • For the tests, force the usage of the Boost static libraries by setting Boost_USE_STATIC_LIBS to ON in CMake. Fix #50

v1.0.0

25 Mar 23:46
3050179
Compare
Choose a tag to compare
  • 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

22 Jun 05:04
Compare
Choose a tag to compare
  • 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, the clear() method will also reset the bucket_count of the hash table to 0.
  • Fix shrink when min_load_factor is set and a range erase with end() as last is called. The m_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 underlying value_type.

v0.6.2

25 Sep 20:22
908ccf9
Compare
Choose a tag to compare
  • 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 the load_factor() stayed below REHASH_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

17 Feb 19:25
3285ed7
Compare
Choose a tag to compare
  • Fix compilation error with GCC 9, the implicit copy/move constructor/operator of the iterator were not generated (#12).
  • Rename the internal insert with hint method to insert_hint to avoid a potential ambiguous overload with the insert with a pair of iterators.

v0.6.0

27 Jan 14:15
Compare
Choose a tag to compare
  • Rename CMake project name from tsl_robin_map to tsl-robin-map for coherence with the convention used by most package managers. The find_package(tsl-robin-map) command must now be used instead of the find_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 from target_compile_features to avoid a warning with older versions of CMake that don't support it. The warning was given even if the target_compile_features was surrounded in a if(${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.