Add draft of insert(init_type&&) for unordered_flat_map

This commit is contained in:
Christian Mazakas
2022-10-20 14:59:33 -07:00
parent 59f4da0a47
commit fe32f153a2
3 changed files with 171 additions and 3 deletions

View File

@@ -216,12 +216,14 @@ namespace boost {
void clear() noexcept { table_.clear(); }
std::pair<iterator, bool> insert(value_type const& value)
template <class Ty>
auto insert(Ty&& value)
-> decltype(table_.insert(std::forward<Ty>(value)))
{
return table_.insert(value);
return table_.insert(std::forward<Ty>(value));
}
std::pair<iterator, bool> insert(value_type&& value)
std::pair<iterator, bool> insert(init_type&& value)
{
return table_.insert(std::move(value));
}