Now, I am using TBB, and memory_pool_allocator for scalable memory allocation.
I use unordered_map with its value as vector, and the vector uses some custom allocator.
When I emplace some key&value into the unordered_map, compilation error occurs.
I think that this is due to the default constructor problem which is often seen in use of unordered_map (value has no default constructor).
Do you know how to solve such a situation, value type is vector with custom allocator?
(Indeed, they are concurrent version in TBB, like tbb::concurrent_unordered_map<int, tbb::concurrent_vector<type, allocator> >, and allocator is tbb::memory_pool_allocator)
Now, I am using TBB, and memory_pool_allocator for scalable memory allocation.
tbb::memory_pool_allocator does not have a default constructor. This means that in order to create a vector within the map, an allocator must be supplied explicitly. For example:
BTW, if I use not std::unordered_map<int, std::vector<int> >, but
std::unordered_map<std::unordered_map<int, std::vector<int> > >,
how can I resolve this?