include/tsl/robin_hash.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/tsl/robin_hash.h b/include/tsl/robin_hash.h
index 543ec3c..9dccd74 100644
--- a/include/tsl/robin_hash.h
+++ b/include/tsl/robin_hash.h
@@ -422,9 +422,16 @@ public:
robin_iterator() noexcept {
}
- robin_iterator(const robin_iterator<false>& other) noexcept: m_bucket(other.m_bucket) {
+ // Copy constructor from iterator to const_iterator.
+ template<bool TIsConst = IsConst, typename std::enable_if<TIsConst>::type* = nullptr>
+ robin_iterator(const robin_iterator<!TIsConst>& other) noexcept: m_bucket(other.m_bucket) {
}
+ robin_iterator(const robin_iterator& other) = default;
+ robin_iterator(robin_iterator&& other) = default;
+ robin_iterator& operator=(const robin_iterator& other) = default;
+ robin_iterator& operator=(robin_iterator&& other) = default;
+
const typename robin_hash::key_type& key() const {
return KeySelect()(m_bucket->value());
}