Releases: Tessil/hopscotch-map
Releases · Tessil/hopscotch-map
v2.3.1
- 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 undefined behaviour. - When exceptions are disabled, only print the error message to stderr when
TSL_DEBUG
is defined instead ofNDEBUG
- Fix compatibility with
std::pmr
allocators
v2.3.0
- 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
.
v2.2.1
v2.2.0
- Rename CMake project name from
tsl_hopscotch_map
totsl-hopscotch-map
for coherence with the convention used by most package managers. Thefind_package(tsl-hopscotch-map)
command must now be used instead of thefind_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
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")
.
v2.1.0
- 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 variablebucket_hash::hash_type
doesn't exist anymore due to previous refactoring. Remove thehopscotch_bucket::max_size
as this is now obsolete.
v2.0.1
v2.0.0
General overhaul of the library introducing minor backward incompatibilities.
- Move the header files from
src
toinclude/tsl
for more coherence with other C++ libraries. - For CMake users, add an exported target
tsl::hopscotch_map
to be used withtarget_link_libraries
. - Move growth policies from the
tsl
namespace to thetsl::hh
namespace. - Add
GrowthFactor
template parameter totsl::hh::power_of_two_growth_policy
. - Rename
hopscotch_sc_map
tobhopscotch_map
andhopscotch_sc_set
tobhopscotch_set
. - Check that the
max_load_factor
passed in parameter is between 0.1 and 0.95.
v1.5.0
- Correct issue #31, a moved
tsl::hopscotch_map
ortsl::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 customGrowthPolicy
check the interface update.
v1.4.0
- 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 toGrowthPolicy
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.