C++11 allocator compliant unordered containers
François Dumont
frs.dumont@gmail.com
Wed Feb 13 21:10:00 GMT 2013
Hi
I am working on making unordered containers C++11 allocator
compliant. In assignment operator I would like, when the allocator let
me do it, reuse existing nodes rather than reallocating everything. To
do so I use the copy assignment operator on the value_type. On
unordered_set no problem, on unordered_map value_type is pair<const Key,
Value> which is not copy assignable.
So can I consider in this context that I have a pair<Key, Value> or
should I never reuse existing nodes ? I know that you are working on the
equivalent for std::set and std::map Jonathan. Have you come to the same
question ?
François
More information about the Libstdc++
mailing list