diff options
Diffstat (limited to 'absl/container/internal/container_memory.h')
-rw-r--r-- | absl/container/internal/container_memory.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/absl/container/internal/container_memory.h b/absl/container/internal/container_memory.h index 55b59c7ff313..3487ac18998f 100644 --- a/absl/container/internal/container_memory.h +++ b/absl/container/internal/container_memory.h @@ -31,6 +31,7 @@ #include <utility> #include "absl/memory/memory.h" +#include "absl/meta/type_traits.h" #include "absl/utility/utility.h" namespace absl { @@ -319,11 +320,12 @@ union map_slot_type { map_slot_type() {} ~map_slot_type() = delete; using value_type = std::pair<const K, V>; - using mutable_value_type = std::pair<K, V>; + using mutable_value_type = + std::pair<absl::remove_const_t<K>, absl::remove_const_t<V>>; value_type value; mutable_value_type mutable_value; - K key; + absl::remove_const_t<K> key; }; template <class K, class V> |