Skip to content

Commit

Permalink
Getting this to compile in VS2015 again
Browse files Browse the repository at this point in the history
  • Loading branch information
skarupke committed May 29, 2018
1 parent b02e033 commit 1c996c9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
18 changes: 12 additions & 6 deletions bytell_hash_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ using ska::detailv3::HashPolicySelector;
template<typename = void>
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;
Expand Down Expand Up @@ -99,6 +99,12 @@ constexpr size_t sherwood_v8_constants<T>::jump_distances[num_jump_distances];
template<typename T, uint8_t BlockSize>
struct sherwood_v8_block
{
sherwood_v8_block()
{
}
~sherwood_v8_block()
{
}
int8_t control_bytes[BlockSize];
union
{
Expand Down
9 changes: 7 additions & 2 deletions flat_hash_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ static constexpr int8_t min_lookups = 4;
template<typename T>
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)
{
}
Expand Down Expand Up @@ -448,6 +448,11 @@ class sherwood_v3_table : private EntryAlloc, private Hasher, private Equal
template<typename ValueType>
struct templated_iterator
{
templated_iterator() = default;
templated_iterator(EntryPointer current)
: current(current)
{
}
EntryPointer current = EntryPointer();

using iterator_category = std::forward_iterator_tag;
Expand Down

0 comments on commit 1c996c9

Please sign in to comment.