I would like to use a different allocator
than the default one in unordered_map
.
For my specific allocator
, I want to call another constructor than the default one (I want to pass an int
to the constructor).
I think the problem is that unordered_map
calls the default constructor
of my allocator
.
So, Eventually I want to do something like that:
Instead of calling this unordered_map
constructor:
std::tr1::unordered_map<int, int, std::tr1::hash<int>, std::equal_to<int>, MyAllocatorNs::MyAllocator<std::pair<const int, int> > > unorderedMap;
I want to do something like that:
std::tr1::unordered_map<int, int, std::tr1::hash<int>, std::equal_to<int>, MyAllocatorNs::MyAllocator<std::pair<const int, int> >(3) > unorderedMap;
Is it possible anyhow?