|
@@ -89,16 +89,17 @@ struct hash<const char*> {
|
|
|
|
|
|
template <typename Key, typename Data,
|
|
|
typename HashFcn = hash<Key>,
|
|
|
- typename EqualKey = int,
|
|
|
+ typename EqualKey = std::equal_to<Key>,
|
|
|
typename Alloc = std::allocator< std::pair<const Key, Data> > >
|
|
|
-class hash_map : public std::map<Key, Data, HashFcn, Alloc> {
|
|
|
+class hash_map : public std::map<Key, Data, HashFcn, EqualKey, Alloc> {
|
|
|
public:
|
|
|
- hash_map(int = 0) {}
|
|
|
+ hash_map(int = 0, const HashFcn& = HashFcn(), const EqualKey& = EqualKey(),
|
|
|
+ const Alloc& = Alloc()) {}
|
|
|
};
|
|
|
|
|
|
template <typename Key,
|
|
|
typename HashFcn = hash<Key>,
|
|
|
- typename EqualKey = int >
|
|
|
+ typename EqualKey = std::equal_to<Key> >
|
|
|
class hash_set : public std::set<Key, HashFcn> {
|
|
|
public:
|
|
|
hash_set(int = 0) {}
|
|
@@ -126,19 +127,21 @@ struct hash<const char*>
|
|
|
|
|
|
template <typename Key, typename Data,
|
|
|
typename HashFcn = hash<Key>,
|
|
|
- typename EqualKey = int,
|
|
|
+ typename EqualKey = std::equal_to<Key>,
|
|
|
typename Alloc = std::allocator< std::pair<const Key, Data> > >
|
|
|
-class hash_map : public GOOGLE_PROTOBUF_HASH_NAMESPACE::hash_map<
|
|
|
- Key, Data, HashFcn, Alloc> {
|
|
|
+class hash_map
|
|
|
+ : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_MAP_CLASS<
|
|
|
+ Key, Data, HashFcn, EqualKey, Alloc> {
|
|
|
public:
|
|
|
- hash_map(int = 0) {}
|
|
|
+ hash_map(int = 0, const HashFcn& = HashFcn(), const EqualKey& = EqualKey(),
|
|
|
+ const Alloc& = Alloc()) {}
|
|
|
};
|
|
|
|
|
|
-template <typename Key,
|
|
|
- typename HashFcn = hash<Key>,
|
|
|
- typename EqualKey = int >
|
|
|
-class hash_set : public GOOGLE_PROTOBUF_HASH_NAMESPACE::hash_set<
|
|
|
- Key, HashFcn> {
|
|
|
+template <typename Key, typename HashFcn = hash<Key>,
|
|
|
+ typename EqualKey = std::equal_to<Key> >
|
|
|
+class hash_set
|
|
|
+ : public GOOGLE_PROTOBUF_HASH_NAMESPACE::GOOGLE_PROTOBUF_HASH_SET_CLASS<
|
|
|
+ Key, HashFcn, EqualKey> {
|
|
|
public:
|
|
|
hash_set(int = 0) {}
|
|
|
};
|
|
@@ -169,7 +172,8 @@ struct hash<const char*> {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-template <typename Key, typename Data, typename HashFcn = hash<Key>,
|
|
|
+template <typename Key, typename Data,
|
|
|
+ typename HashFcn = hash<Key>,
|
|
|
typename EqualKey = std::equal_to<Key>,
|
|
|
typename Alloc = std::allocator< std::pair<const Key, Data> > >
|
|
|
class hash_map
|