From 0398afae9b864a34ec6d50dc64204755cb8ff2b4 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 25 Nov 2022 18:01:39 +0200 Subject: [PATCH] Add BOOST_FORCEINLINE to unordered_flat_set::contains, unordered_flat_map::contains. Refs #168. --- include/boost/unordered/unordered_flat_map.hpp | 4 ++-- include/boost/unordered/unordered_flat_set.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/unordered/unordered_flat_map.hpp b/include/boost/unordered/unordered_flat_map.hpp index f65ef252..ce09af90 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -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 - typename std::enable_if< + BOOST_FORCEINLINE typename std::enable_if< boost::unordered::detail::are_transparent::value, bool>::type contains(K const& key) const diff --git a/include/boost/unordered/unordered_flat_set.hpp b/include/boost/unordered/unordered_flat_set.hpp index 83dddc7f..29c53596 100644 --- a/include/boost/unordered/unordered_flat_set.hpp +++ b/include/boost/unordered/unordered_flat_set.hpp @@ -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 - typename std::enable_if< + BOOST_FORCEINLINE typename std::enable_if< boost::unordered::detail::are_transparent::value, bool>::type contains(K const& key) const