From 79dc3bb6d42681ae77623597878e7ecf3d73170c Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 25 Nov 2022 17:57:06 +0200 Subject: [PATCH] Add BOOST_FORCEINLINE to unordered_flat_set::count, unordered_flat_map::count --- 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 786d8160..f65ef252 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -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 - typename std::enable_if< + BOOST_FORCEINLINE typename std::enable_if< detail::are_transparent::value, size_type>::type count(K const& key) const { diff --git a/include/boost/unordered/unordered_flat_set.hpp b/include/boost/unordered/unordered_flat_set.hpp index 413144dd..83dddc7f 100644 --- a/include/boost/unordered/unordered_flat_set.hpp +++ b/include/boost/unordered/unordered_flat_set.hpp @@ -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 - typename std::enable_if< + BOOST_FORCEINLINE typename std::enable_if< detail::are_transparent::value, size_type>::type count(K const& key) const {