diff options
author | Feng Xiao <xiaofeng@google.com> | 2015-09-10 12:45:22 -0700 |
---|---|---|
committer | Feng Xiao <xiaofeng@google.com> | 2015-09-10 12:45:22 -0700 |
commit | c8c5fed544b20b8ca865113d858e9b98deb00a4b (patch) | |
tree | fce1a5383a9dcf03e1468afe3c4b9dcaf84b1552 /src | |
parent | e61ff47ac30f7ce7b06d789f18439d5142ac8c97 (diff) | |
parent | f5a332553e7947e6b1a5f9ddde97784d715dc685 (diff) | |
download | protobuf-c8c5fed544b20b8ca865113d858e9b98deb00a4b.tar.gz protobuf-c8c5fed544b20b8ca865113d858e9b98deb00a4b.tar.bz2 protobuf-c8c5fed544b20b8ca865113d858e9b98deb00a4b.zip |
Merge pull request #766 from pkasting/hash
Refine check for unordered_{map|set} availability.
Diffstat (limited to 'src')
-rwxr-xr-x | src/google/protobuf/stubs/hash.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/google/protobuf/stubs/hash.h b/src/google/protobuf/stubs/hash.h index c6f210f0..e7b3771f 100755 --- a/src/google/protobuf/stubs/hash.h +++ b/src/google/protobuf/stubs/hash.h @@ -41,10 +41,10 @@ #define GOOGLE_PROTOBUF_HAVE_HASH_MAP 1 #define GOOGLE_PROTOBUF_HAVE_HASH_SET 1 -// Use C++11 unordered_{map|set} if available. Otherwise, libc++ always support -// unordered_{map|set} -#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X) || \ - defined(_LIBCPP_VERSION) +// Use C++11 unordered_{map|set} if available. +#if ((_LIBCPP_STD_VER >= 11) || \ + (((__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X)) && \ + (__GLIBCXX__ > 20090421))) # define GOOGLE_PROTOBUF_HAS_CXX11_HASH // For XCode >= 4.6: the compiler is clang with libc++. |