浏览代码

Merge pull request #4183 from pcc/win-libcxx

Add support for libc++ on Windows.
Feng Xiao 7 年之前
父节点
当前提交
9dc0a4d5cf
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 1 1
      src/google/protobuf/arena.h
  2. 2 1
      src/google/protobuf/stubs/hash.h

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

@@ -40,7 +40,7 @@
 #if LANG_CXX11
 #include <google/protobuf/stubs/type_traits.h>
 #endif
-#if defined(_MSC_VER) && !_HAS_EXCEPTIONS
+#if defined(_MSC_VER) && !defined(_LIBCPP_STD_VER) && !_HAS_EXCEPTIONS
 // Work around bugs in MSVC <typeinfo> header when _HAS_EXCEPTIONS=0.
 #include <exception>
 #include <typeinfo>

+ 2 - 1
src/google/protobuf/stubs/hash.h

@@ -235,7 +235,8 @@ class hash_set : public std::set<Key, HashFcn> {
   HashFcn hash_function() const { return HashFcn(); }
 };
 
-#elif defined(_MSC_VER) && !defined(_STLPORT_VERSION)
+#elif defined(_MSC_VER) && !defined(_STLPORT_VERSION) && \
+    !(defined(_LIBCPP_STD_VER) && _LIBCPP_STD_VER >= 11)
 
 template <typename Key>
 struct hash : public GOOGLE_PROTOBUF_HASH_COMPARE<Key> {