C++ hash map and hash set which preserve the order of insertion
This release fixes a critical bug in insert_at_position
and erase
(unordered_erase
and pop_back
are not affected), upgrade is recommended if these functions are used.
shift_indexes_in_buckets
by going through the whole m_buckets_data
instead of finding back the bucket through m_values
(#39 39)defined(TSL_DEBUG)
instead of !defined(NDEBUG)
bool contains(...)
methods.insert
with hint method to insert_hint
to avoid a potential ambiguous overload with the insert
with a pair of iterators.tsl_ordered_map
to tsl-ordered-map
for coherence with the convention used by most package managers. The find_package(tsl-ordered-map)
command must now be used instead of the find_package(tsl_ordered_map)
.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")
.rehash(0)
on an empty map with a bucket_count > 0
would result in an invalid m_buckets
pointer leading to potential segfaults.CMakeLists.txt
. Only add the CMake installation rules for version of CMake >= 3.3 to keep compatibility with CMake 3.1..natvis
file (#20).erase
and insert_at_position
on platforms where the char
type is unsigned.This release introduce a minor backward incompatibility by moving the headers files.
tsl
to include/tsl
for more coherence with other C++ libraries.tsl::ordered_map
to be used with target_link_libraries
.max_load_factor(float ml)
, check that the ml
parameter is in the range [0.1, 0.95].ordered_map.h
into ordered_hash.h
, ordered_map.h
and ordered_set.h
.src
directory to tsl
directoryequal_range
, the second iterator was always equal to the first.uint_least32_t
instead of uint32_t
for portability.insert_at_position
, emplace_at_position
and try_emplace_at_position methods
.emplace_hint
.iterator nth(size_type index)
method.operator+
in iterators (#4).max_size()
when inserting a new element.