Skip to content

Releases: Tessil/robin-map

v1.4.1

02 Nov 19:30

Choose a tag to compare

  • Update cmake_minimum_required to 3.10

v1.4.0

30 Mar 13:55

Choose a tag to compare

  • Add a CMake TSL_ROBIN_MAP_ENABLE_INSTALL option to explicitly enable/disable the install target
  • Move to C++17 dropping C++11 support
  • Bump cmake_minimum_required version to 3.5
  • Fix load threshold on deserialization
    The current version computes load using max_load_factor() without first
    setting m_bucket_count (default 0) leading to threshold 0, which
    triggers rehash (and size increase) on first insert.
    Recompute the threshold after setting correct bucket count to avoid
    this.
  • Use inline constexpr for PRIMES and MOD_PRIME arrays

v1.3.0

20 Apr 18:20

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

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

Choose a tag to compare

  • Fix missing project version increment in CMake (d37a410)

v1.2.0

05 Jan 22:57

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

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

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

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

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.