mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 03:47:16 +02:00
Add BOOST_FORCEINLINE to unordered_flat_map::operator[]
This commit is contained in:
@ -427,12 +427,12 @@ namespace boost {
|
|||||||
std::out_of_range("key was not found in unordered_flat_map"));
|
std::out_of_range("key was not found in unordered_flat_map"));
|
||||||
}
|
}
|
||||||
|
|
||||||
mapped_type& operator[](key_type const& key)
|
BOOST_FORCEINLINE mapped_type& operator[](key_type const& key)
|
||||||
{
|
{
|
||||||
return table_.try_emplace(key).first->second;
|
return table_.try_emplace(key).first->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
mapped_type& operator[](key_type&& key)
|
BOOST_FORCEINLINE mapped_type& operator[](key_type&& key)
|
||||||
{
|
{
|
||||||
return table_.try_emplace(std::move(key)).first->second;
|
return table_.try_emplace(std::move(key)).first->second;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user