Skip to content

Commit

Permalink
fix clang/gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyMakeev committed Jan 23, 2024
1 parent b22aee3 commit 2f91aeb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ExcaliburHash/ExcaliburHash.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@ template <typename TKey, typename TValue, typename TKeyInfo = KeyInfo<TKey>> cla
public:
IteratorBase() = delete;

IteratorBase(const IteratorBase& other) noexcept
: m_ht(other.m_ht)
, m_item(other.m_item)
{
}

IteratorBase(const HashTable* ht, TItem* item) noexcept
: m_ht(ht)
, m_item(item)
Expand Down Expand Up @@ -542,9 +548,16 @@ template <typename TKey, typename TValue, typename TKeyInfo = KeyInfo<TKey>> cla
public:
TIteratorKV() = delete;

TIteratorKV(const TIteratorKV& other)
: IteratorBase(other)
, tmpKv(reference<const TKey>(nullptr), reference<TIteratorValue>(nullptr))
{
}

TIteratorKV& operator=(const TIteratorKV& other) noexcept
{
IteratorBase::copyFrom(other);
// note: we'll automatically update tmpKv on the next access = no need to copy
return *this;
}

Expand Down

0 comments on commit 2f91aeb

Please sign in to comment.