From 2eb57995ddba70190db8da487acde0650f51b1c8 Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Tue, 27 Sep 2022 10:30:14 -0700 Subject: [PATCH] Add initial find() impl for benchmarks --- include/boost/unordered/unordered_flat_map.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/unordered/unordered_flat_map.hpp b/include/boost/unordered/unordered_flat_map.hpp index 37344c50..9229f381 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -72,6 +72,16 @@ namespace boost { void erase(const_iterator pos) { return table_.erase(pos); } size_type erase(key_type const& key) { return table_.erase(key); } + /// Lookup + /// + + iterator find(key_type const& key) { return table_.find(key); } + + const_iterator find(key_type const& key) const + { + return table_.find(key); + } + std::pair equal_range(key_type const& key) { auto pos = table_.find(key);