aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/hash.h
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2015-03-01 19:51:58 -0800
committerGravatar Jisi Liu <jisi.liu@gmail.com>2015-03-01 19:51:58 -0800
commit14fe0c99bb226e111f6a3ddf0b70d911505871ff (patch)
tree49c0cef47c90b9cdbe4e730d50de07d0cccd77a6 /src/google/protobuf/stubs/hash.h
parent0a25cfe69d3c6f04d3d0a779549f126731aa4964 (diff)
Fix hash_map type parameter to add Alloc for other platforms.
Change-Id: Idc5fb65a2cc469d55aff6f2cde0b51b326be0963
Diffstat (limited to 'src/google/protobuf/stubs/hash.h')
-rw-r--r--src/google/protobuf/stubs/hash.h10
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) {}
};