aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/kstd/flat_map.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/kstd/kstd/flat_map.hpp')
-rw-r--r--libs/kstd/kstd/flat_map.hpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/libs/kstd/kstd/flat_map.hpp b/libs/kstd/kstd/flat_map.hpp
index c9a33b4a..9f3d76b1 100644
--- a/libs/kstd/kstd/flat_map.hpp
+++ b/libs/kstd/kstd/flat_map.hpp
@@ -263,6 +263,9 @@ namespace kstd
{}
//! Construct a new flat map by copying from an existing one.
+ constexpr flat_map(flat_map const & other) = default;
+
+ //! Construct a new flat map by copying from an existing one.
//!
//! @note This constructor only participates in overload resolution if both the key and the mapped container use
//! allocator construction using the given allocator.
@@ -626,7 +629,7 @@ namespace kstd
!m_comparator(*key_iterator, value.first))
{
return {
- iterator{m_containers, offset},
+ iterator{m_containers, static_cast<size_type>(offset)},
false
};
}
@@ -635,7 +638,7 @@ namespace kstd
m_containers.values.insert(m_containers.values.begin() + offset, std::move(value.second));
return {
- iterator{m_containers, offset},
+ iterator{m_containers, static_cast<size_type>(offset)},
true
};
}
@@ -656,7 +659,7 @@ namespace kstd
!m_comparator(key, *key_iterator))
{
return {
- iterator{m_containers, offset},
+ iterator{m_containers, static_cast<size_type>(offset)},
false
};
}
@@ -686,7 +689,7 @@ namespace kstd
!m_comparator(key, *key_iterator))
{
return {
- iterator{m_containers, offset},
+ iterator{m_containers, static_cast<size_type>(offset)},
false
};
}
@@ -695,7 +698,7 @@ namespace kstd
m_containers.values.emplace(m_containers.values.begin() + offset, std::forward<Args>(args)...);
return {
- iterator{m_containers, offset},
+ iterator{m_containers, static_cast<size_type>(offset)},
true
};
}
@@ -721,7 +724,7 @@ namespace kstd
!m_comparator(key, *key_iterator))
{
return {
- iterator{m_containers, offset},
+ iterator{m_containers, static_cast<size_type>(offset)},
false
};
}
@@ -730,7 +733,7 @@ namespace kstd
m_containers.values.emplace(m_containers.values.begin() + offset, std::forward<Args>(args)...);
return {
- iterator{m_containers, offset},
+ iterator{m_containers, static_cast<size_type>(offset)},
true
};
}
@@ -765,7 +768,7 @@ namespace kstd
auto key_iterator = m_containers.keys.erase(first.key_iterator(), last.key_iterator());
m_containers.values.erase(first.value_iterator(), last.value_iterator());
auto offset = std::distance(m_containers.keys.begin(), key_iterator);
- return iterator{m_containers, offset};
+ return iterator{m_containers, static_cast<size_type>(offset)};
}
//! Erase all elements with keys equivalent to a given one from this flat map.
@@ -838,7 +841,7 @@ namespace kstd
if (found != m_containers.keys.cend() && !m_comparator(x, *found) && !m_comparator(*found, x))
{
auto offset = std::distance(m_containers.keys.begin(), found);
- return iterator{m_containers, offset};
+ return iterator{m_containers, static_cast<size_type>(offset)};
}
return end();
}
@@ -855,7 +858,7 @@ namespace kstd
if (found != m_containers.keys.cend() && !m_comparator(x, *found) && !m_comparator(*found, x))
{
auto offset = std::distance(m_containers.keys.cbegin(), found);
- return const_iterator{m_containers, offset};
+ return const_iterator{m_containers, static_cast<size_type>(offset)};
}
return cend();
}