diff --git a/bytell_hash_map.hpp b/bytell_hash_map.hpp index 2a7ee2e..34d8593 100644 --- a/bytell_hash_map.hpp +++ b/bytell_hash_map.hpp @@ -35,13 +35,13 @@ using ska::detailv3::HashPolicySelector; template struct sherwood_v8_constants { - static constexpr int8_t magic_for_empty = 0b11111111; - static constexpr int8_t magic_for_reserved = 0b11111110; - static constexpr int8_t bits_for_direct_hit = 0b10000000; - static constexpr int8_t magic_for_direct_hit = 0b00000000; - static constexpr int8_t magic_for_list_entry = 0b10000000; + static constexpr int8_t magic_for_empty = int8_t(0b11111111); + static constexpr int8_t magic_for_reserved = int8_t(0b11111110); + static constexpr int8_t bits_for_direct_hit = int8_t(0b10000000); + static constexpr int8_t magic_for_direct_hit = int8_t(0b00000000); + static constexpr int8_t magic_for_list_entry = int8_t(0b10000000); - static constexpr int8_t bits_for_distance = 0b01111111; + static constexpr int8_t bits_for_distance = int8_t(0b01111111); inline static int distance_from_metadata(int8_t metadata) { return metadata & bits_for_distance; @@ -99,6 +99,12 @@ constexpr size_t sherwood_v8_constants::jump_distances[num_jump_distances]; template struct sherwood_v8_block { + sherwood_v8_block() + { + } + ~sherwood_v8_block() + { + } int8_t control_bytes[BlockSize]; union { diff --git a/flat_hash_map.hpp b/flat_hash_map.hpp index 045c19e..c83d9f3 100644 --- a/flat_hash_map.hpp +++ b/flat_hash_map.hpp @@ -159,10 +159,10 @@ static constexpr int8_t min_lookups = 4; template struct sherwood_v3_entry { - constexpr sherwood_v3_entry() + sherwood_v3_entry() { } - constexpr sherwood_v3_entry(int8_t distance_from_desired) + sherwood_v3_entry(int8_t distance_from_desired) : distance_from_desired(distance_from_desired) { } @@ -448,6 +448,11 @@ class sherwood_v3_table : private EntryAlloc, private Hasher, private Equal template struct templated_iterator { + templated_iterator() = default; + templated_iterator(EntryPointer current) + : current(current) + { + } EntryPointer current = EntryPointer(); using iterator_category = std::forward_iterator_tag;