Add BOOST_FORCEINLINE to unordered_flat_set::contains, unordered_flat_map::contains. Refs #168.

This commit is contained in:
Peter Dimov
2022-11-25 18:01:39 +02:00
parent 79dc3bb6d4
commit 0398afae9b
2 changed files with 4 additions and 4 deletions

View File

@ -480,13 +480,13 @@ namespace boost {
return table_.find(key);
}
bool contains(key_type const& key) const
BOOST_FORCEINLINE bool contains(key_type const& key) const
{
return this->find(key) != this->end();
}
template <class K>
typename std::enable_if<
BOOST_FORCEINLINE typename std::enable_if<
boost::unordered::detail::are_transparent<K, hasher, key_equal>::value,
bool>::type
contains(K const& key) const

View File

@ -356,13 +356,13 @@ namespace boost {
return table_.find(key);
}
bool contains(key_type const& key) const
BOOST_FORCEINLINE bool contains(key_type const& key) const
{
return this->find(key) != this->end();
}
template <class K>
typename std::enable_if<
BOOST_FORCEINLINE typename std::enable_if<
boost::unordered::detail::are_transparent<K, hasher, key_equal>::value,
bool>::type
contains(K const& key) const