| Index: mojo/public/cpp/bindings/map_traits_stl.h
|
| diff --git a/mojo/public/cpp/bindings/map_traits_stl.h b/mojo/public/cpp/bindings/map_traits_stl.h
|
| index ff79a200d3e87bbf229f92206930db6af8c62bd9..83a4399ce064597cb3062ffa94303d5a0d5af6c1 100644
|
| --- a/mojo/public/cpp/bindings/map_traits_stl.h
|
| +++ b/mojo/public/cpp/bindings/map_traits_stl.h
|
| @@ -94,14 +94,10 @@ struct MapTraits<std::unordered_map<K, V>> {
|
| static V& GetValue(Iterator& iterator) { return iterator->second; }
|
| static const V& GetValue(ConstIterator& iterator) { return iterator->second; }
|
|
|
| - static bool Insert(std::unordered_map<K, V>& input, const K& key, V&& value) {
|
| - input.insert(std::make_pair(key, std::forward<V>(value)));
|
| - return true;
|
| - }
|
| - static bool Insert(std::unordered_map<K, V>& input,
|
| - const K& key,
|
| - const V& value) {
|
| - input.insert(std::make_pair(key, value));
|
| + template <typename IK, typename IV>
|
| + static bool Insert(std::unordered_map<K, V>& input, IK&& key, IV&& value) {
|
| + input.insert(
|
| + std::make_pair(std::forward<IK>(key), std::forward<IV>(value)));
|
| return true;
|
| }
|
|
|
|
|