diff options
author | Jisi Liu <jisi.liu@gmail.com> | 2015-03-01 19:51:58 -0800 |
---|---|---|
committer | Jisi Liu <jisi.liu@gmail.com> | 2015-03-01 19:51:58 -0800 |
commit | 14fe0c99bb226e111f6a3ddf0b70d911505871ff (patch) | |
tree | 49c0cef47c90b9cdbe4e730d50de07d0cccd77a6 | |
parent | 0a25cfe69d3c6f04d3d0a779549f126731aa4964 (diff) | |
download | protobuf-14fe0c99bb226e111f6a3ddf0b70d911505871ff.tar.gz protobuf-14fe0c99bb226e111f6a3ddf0b70d911505871ff.tar.bz2 protobuf-14fe0c99bb226e111f6a3ddf0b70d911505871ff.zip |
Fix hash_map type parameter to add Alloc for other platforms.
Change-Id: Idc5fb65a2cc469d55aff6f2cde0b51b326be0963
-rw-r--r-- | src/google/protobuf/stubs/hash.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/google/protobuf/stubs/hash.h b/src/google/protobuf/stubs/hash.h index 33b7b91a..96f74a67 100644 --- a/src/google/protobuf/stubs/hash.h +++ b/src/google/protobuf/stubs/hash.h @@ -89,8 +89,9 @@ struct hash<const char*> { template <typename Key, typename Data, typename HashFcn = hash<Key>, - typename EqualKey = int > -class hash_map : public std::map<Key, Data, HashFcn> { + typename EqualKey = int, + typename Alloc = std::allocator< std::pair<const Key, Data> > > +class hash_map : public std::map<Key, Data, HashFcn, Alloc> { public: hash_map(int = 0) {} }; @@ -125,9 +126,10 @@ struct hash<const char*> template <typename Key, typename Data, typename HashFcn = hash<Key>, - typename EqualKey = int > + typename EqualKey = int, + typename Alloc = std::allocator< std::pair<const Key, Data> > > class hash_map : public GOOGLE_PROTOBUF_HASH_NAMESPACE::hash_map< - Key, Data, HashFcn> { + Key, Data, HashFcn, Alloc> { public: hash_map(int = 0) {} }; |