diff --git a/benchmark/uint64.cpp b/benchmark/uint64.cpp index 4abc4a3e..e6eb18d0 100644 --- a/benchmark/uint64.cpp +++ b/benchmark/uint64.cpp @@ -316,8 +316,25 @@ template using boost_unordered_map = template struct map_types { using key_type = Key; - using value_type = std::pair; - static auto& extract(const value_type& x) { return x.first; } + using raw_key_type = typename std::remove_const::type; + using raw_mapped_type = typename std::remove_const::type; + + using init_type = std::pair; + using moved_type = std::pair; + using value_type = std::pair; + + template + static raw_key_type const& extract(std::pair const& kv) + { + return kv.first; + } + + static moved_type move(value_type& x) + { + // TODO: we probably need to launder here + return {std::move(const_cast(x.first)), + std::move(const_cast(x.second))}; + } }; template