Skip to content

Commit e6f5714

Browse files
committed
Fix compilation error with GCC 9, the implicit copy/move constructor/operator of the iterator were not generated.
1 parent b3f274a commit e6f5714

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/tsl/array_hash.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,12 +827,18 @@ class array_hash: private value_container<T>, private Hash, private GrowthPolicy
827827
array_hash_iterator() noexcept: m_array_hash(nullptr) {
828828
}
829829

830-
array_hash_iterator(const array_hash_iterator<false>& other) noexcept :
830+
template<bool TIsConst = IsConst, typename std::enable_if<TIsConst>::type* = nullptr>
831+
array_hash_iterator(const array_hash_iterator<!TIsConst>& other) noexcept :
831832
m_buckets_iterator(other.m_buckets_iterator),
832833
m_array_bucket_iterator(other.m_array_bucket_iterator),
833834
m_array_hash(other.m_array_hash)
834835
{
835836
}
837+
838+
array_hash_iterator(const array_hash_iterator& other) = default;
839+
array_hash_iterator(array_hash_iterator&& other) = default;
840+
array_hash_iterator& operator=(const array_hash_iterator& other) = default;
841+
array_hash_iterator& operator=(array_hash_iterator&& other) = default;
836842

837843
const CharT* key() const {
838844
return m_array_bucket_iterator.key();

0 commit comments

Comments
 (0)