Переглянути джерело

Fix compiling clang/libc++ builds. (Issue: #1266)

Antal Tátrai 9 роки тому
батько
коміт
3cc35adb6d
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/google/protobuf/map.h

+ 1 - 1
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>