浏览代码

Merge pull request #1317 from benvanik/patch-1

Fixing compilation error when building with emscripten.
Feng Xiao 9 年之前
父节点
当前提交
dfaf1aac30
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/google/protobuf/map.h

+ 3 - 1
src/google/protobuf/map.h

@@ -545,7 +545,9 @@ class Map {
     }
     }
 
 
 #if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) && \
 #if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) && \
-    !defined(GOOGLE_PROTOBUF_OS_NACL) && !defined(GOOGLE_PROTOBUF_OS_ANDROID)
+    !defined(GOOGLE_PROTOBUF_OS_NACL) &&                            \
+    !defined(GOOGLE_PROTOBUF_OS_ANDROID) &&                         \
+    !defined(GOOGLE_PROTOBUF_OS_EMSCRIPTEN)
     template<class NodeType, class... Args>
     template<class NodeType, class... Args>
     void construct(NodeType* p, Args&&... args) {
     void construct(NodeType* p, Args&&... args) {
       // Clang 3.6 doesn't compile static casting to void* directly. (Issue #1266)
       // Clang 3.6 doesn't compile static casting to void* directly. (Issue #1266)