Commit ac0c1325 authored by Tiago Peixoto's avatar Tiago Peixoto

Add 'Allocator' template parameter to vector template specializations

parent 1e5a0f49
......@@ -560,10 +560,10 @@ struct hash<std::pair<T1, T2>>
}
};
template <class Value>
struct hash<vector<Value>>
template <class Value, class Allocator>
struct hash<vector<Value, Allocator>>
{
size_t operator()(const vector<Value>& v) const
size_t operator()(const vector<Value, Allocator>& v) const
{
size_t seed = 0;
for (const auto& x : v)
......
......@@ -53,10 +53,10 @@ struct empty_key
}
};
template <class Key>
struct empty_key<std::vector<Key>>
template <class Key, class Allocator>
struct empty_key<std::vector<Key, Allocator>>
{
static std::vector<Key> get()
static std::vector<Key, Allocator> get()
{
return { empty_key<Key>::get() };
}
......@@ -118,10 +118,10 @@ struct deleted_key
}
};
template <class Key>
struct deleted_key<std::vector<Key>>
template <class Key, class Allocator>
struct deleted_key<std::vector<Key, Allocator>>
{
static std::vector<Key> get()
static std::vector<Key, Allocator> get()
{
return { deleted_key<Key>::get() };
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment