aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/google/protobuf/map.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h
index dfc62420..9dd42572 100644
--- a/src/google/protobuf/map.h
+++ b/src/google/protobuf/map.h
@@ -548,7 +548,7 @@ class Map {
!defined(GOOGLE_PROTOBUF_OS_NACL) && !defined(GOOGLE_PROTOBUF_OS_ANDROID)
template<class NodeType, class... Args>
void construct(NodeType* p, Args&&... args) {
- new (static_cast<void*>(p)) NodeType(std::forward<Args>(args)...);
+ new (const_cast<void*>(static_cast<const void*>(p))) NodeType(std::forward<Args>(args)...);
}
template<class NodeType>