Add BOOST_FORCEINLINE to unordered_flat_set::count, unordered_flat_map::count

This commit is contained in:
Peter Dimov
2022-11-25 17:57:06 +02:00
parent 879de5fab8
commit 79dc3bb6d4
2 changed files with 4 additions and 4 deletions

View File

@ -437,14 +437,14 @@ namespace boost {
return table_.try_emplace(std::move(key)).first->second;
}
size_type count(key_type const& key) const
BOOST_FORCEINLINE size_type count(key_type const& key) const
{
auto pos = table_.find(key);
return pos != table_.end() ? 1 : 0;
}
template <class K>
typename std::enable_if<
BOOST_FORCEINLINE typename std::enable_if<
detail::are_transparent<K, hasher, key_equal>::value, size_type>::type
count(K const& key) const
{

View File

@ -313,14 +313,14 @@ namespace boost {
/// Lookup
///
size_type count(key_type const& key) const
BOOST_FORCEINLINE size_type count(key_type const& key) const
{
auto pos = table_.find(key);
return pos != table_.end() ? 1 : 0;
}
template <class K>
typename std::enable_if<
BOOST_FORCEINLINE typename std::enable_if<
detail::are_transparent<K, hasher, key_equal>::value, size_type>::type
count(K const& key) const
{