From 3da4b6411c2750336587e0c7ecbcea2b8b3ff6df Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Tue, 27 Sep 2022 10:28:10 -0700 Subject: [PATCH] Add rvalue overload of insert() for flat_map --- include/boost/unordered/unordered_flat_map.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/unordered/unordered_flat_map.hpp b/include/boost/unordered/unordered_flat_map.hpp index f8ec0d20..13d08395 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -49,11 +49,19 @@ namespace boost { size_type size() const noexcept { return table_.size(); } + /// Modifiers + /// + std::pair insert(value_type const& value) { return table_.insert(value); } + std::pair insert(value_type&& value) + { + return table_.insert(std::move(value)); + } + size_type count(key_type const& key) const { auto pos = table_.find(key);