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

This commit is contained in:
Antal Tátrai 2016-03-05 09:32:59 +01:00
parent e70f9256af
commit 3cc35adb6d

View File

@ -548,7 +548,7 @@ class Map {
!defined(GOOGLE_PROTOBUF_OS_NACL) && !defined(GOOGLE_PROTOBUF_OS_ANDROID) !defined(GOOGLE_PROTOBUF_OS_NACL) && !defined(GOOGLE_PROTOBUF_OS_ANDROID)
template<class NodeType, class... Args> template<class NodeType, class... Args>
void construct(NodeType* p, Args&&... 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> template<class NodeType>