From 879de5fab8c1a04058a5b8316203f2f902d09fe6 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 25 Nov 2022 17:50:05 +0200 Subject: [PATCH] Add BOOST_FORCEINLINE to unordered_flat_map::operator[] --- include/boost/unordered/unordered_flat_map.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/unordered_flat_map.hpp b/include/boost/unordered/unordered_flat_map.hpp index ac723ce9..786d8160 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -427,12 +427,12 @@ namespace boost { 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; } - mapped_type& operator[](key_type&& key) + BOOST_FORCEINLINE mapped_type& operator[](key_type&& key) { return table_.try_emplace(std::move(key)).first->second; }