Просмотр исходного кода

In std11, on mac, operator new doesn't take right reference.

TeBoring 10 лет назад
Родитель
Сommit
9250fbaead
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/google/protobuf/map.h

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

@@ -167,7 +167,7 @@ class Map {
       }
     }
 
-#if __cplusplus >= 201103L
+#if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE)
     template<class NodeType, class... Args>
     void construct(NodeType* p, Args&&... args) {
       new (p) NodeType(std::forward<Args>(args)...);