This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
C++11 allocator compliant unordered containers
- From: François Dumont <frs dot dumont at gmail dot com>
- To: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 13 Feb 2013 22:10:09 +0100
- Subject: C++11 allocator compliant unordered containers
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