mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
Add rvalue overload of insert() for flat_map
This commit is contained in:
@ -49,11 +49,19 @@ namespace boost {
|
|||||||
|
|
||||||
size_type size() const noexcept { return table_.size(); }
|
size_type size() const noexcept { return table_.size(); }
|
||||||
|
|
||||||
|
/// Modifiers
|
||||||
|
///
|
||||||
|
|
||||||
std::pair<iterator, bool> insert(value_type const& value)
|
std::pair<iterator, bool> insert(value_type const& value)
|
||||||
{
|
{
|
||||||
return table_.insert(value);
|
return table_.insert(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::pair<iterator, bool> insert(value_type&& value)
|
||||||
|
{
|
||||||
|
return table_.insert(std::move(value));
|
||||||
|
}
|
||||||
|
|
||||||
size_type count(key_type const& key) const
|
size_type count(key_type const& key) const
|
||||||
{
|
{
|
||||||
auto pos = table_.find(key);
|
auto pos = table_.find(key);
|
||||||
|
Reference in New Issue
Block a user