Skip to content

Releases: Tessil/hopscotch-map

v2.3.1

25 Jun 10:10
Compare
Choose a tag to compare
  • 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 undefined behaviour.
  • When exceptions are disabled, only print the error message to stderr when TSL_DEBUG is defined instead of NDEBUG
  • Fix compatibility with std::pmr allocators

v2.3.0

22 Jun 05:08
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.

v2.2.1

17 Feb 19:30
b7529df
Compare
Choose a tag to compare
  • Fix compilation error with GCC 9, the implicit copy/move constructor/operator of the iterator were not generated.

v2.2.0

26 Jan 09:46
Compare
Choose a tag to compare
  • Rename CMake project name from tsl_hopscotch_map to tsl-hopscotch-map for coherence with the convention used by most package managers. The find_package(tsl-hopscotch-map) command must now be used instead of the find_package(tsl_hopscotch_map).
  • Set bucket count for default constructed map/set to 0 to avoid any allocation.
  • On Windows, add tsl-hopscotch-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").

v2.1.0

03 Nov 15:13
Compare
Choose a tag to compare
  • Add installation rules in the CMake of the project.
  • Add MSVC debugger visualization .natvis file.
  • Fix issue #41 in max_size() function resulting in compilation error. The variable bucket_hash::hash_type doesn't exist anymore due to previous refactoring. Remove the hopscotch_bucket::max_size as this is now obsolete.

v2.0.1

30 Jul 20:02
Compare
Choose a tag to compare
  • In CMakeList.txt, only use cxx_std_11 in target_compile_features when the CMake version is >= 3.8 (#37).
  • Move the static_assert checking that value_type is nothrow move constructible or copy constructible inside the constructor to avoid issues when Key and/or T are not commplete types (#36).

v2.0.0

01 Jul 10:34
Compare
Choose a tag to compare

General overhaul of the library introducing minor backward incompatibilities.

  • Move the header files from src to include/tsl for more coherence with other C++ libraries.
  • For CMake users, add an exported target tsl::hopscotch_map to be used with target_link_libraries.
  • Move growth policies from the tsl namespace to the tsl::hh namespace.
  • Add GrowthFactor template parameter to tsl::hh::power_of_two_growth_policy.
  • Rename hopscotch_sc_map to bhopscotch_map and hopscotch_sc_set to bhopscotch_set.
  • Check that the max_load_factor passed in parameter is between 0.1 and 0.95.

v1.5.0

27 May 11:12
b08a0d6
Compare
Choose a tag to compare
  • Correct issue #31, a moved tsl::hopscotch_map or tsl::hopscotch_set can now still be used after a move. Previously the map ended up in a invalid state after a move but the standard mandates that a moved object should be in a valid (but unspecified) state so that it can still be used after a move.
  • When a hash map or set with a bucket count of 0 is instantiated, no memory will be allocated.
  • Add iterator mutable_iterator(const_iterator pos) method to convert a const iterator to a mutable iterator.
  • Add a void clear() noexcept method to growth policies classes. If you use a custom GrowthPolicy check the interface update.

v1.4.0

29 Jul 17:12
Compare
Choose a tag to compare
  • Add iterator mutable_iterator(const_iterator pos) method.
  • Add erase method taking a precalculated hash in parameter similar to lookup functions.
  • Reduce default max load factor to 0.9.
  • Add mandatory max_bucket_count() method to GrowthPolicy to take into account the possible limitations of the growth policy.
  • Fix the number of reserved buckets on range insert (i.e. void insert(InputIt first, InputIt last)). The amount was too low.

v1.3.3

16 Jul 11:07
Compare
Choose a tag to compare
  • Critical bug correction (#27), on rehash some elements were lost in the overflow list in some corner cases.
  • Use std::uint_least* instead of std::uint* for better portability.