This is the mail archive of the
mailing list for the libstdc++ project.
Re: Add std::unordered_* C++11 allocator support
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Sat, 6 Apr 2013 19:01:21 +0100
- Subject: Re: Add std::unordered_* C++11 allocator support
- References: <51438861 dot 9010207 at gmail dot com>
Some quick responses to the mail with the original version of the
patch last month ...
On 15 March 2013 20:45, François Dumont wrote:
> I think I have completed support of C++11 allocators in unordered
> I preferred to remove the const of the key part to enable copy/move
> assignment in the context of std::unordered_map/multimap. This will give
> more behavioral consistency accross all the std::unordered_* types.
I was thinking that using C++11 allocators and reusing existing
objects could be done as two separate patches, as they're related but
not dependent on each other, but this is OK.
> I took the opportunity to remove include of <bits/stl_algobase.h> from
> <unordered_set> and <unordered_map> Standard headers. It became useless
> since _Prime_rehash_policy definition that is using std::lower_bound moved
> to src/c++11/hashtable_c0x.cc. This source file doesn't need it neither
> because bits/stl_algobase.h is included by the way through an other path,
> should I add it explicitly ?
No, I think that's OK.
> I also noticed that operator=(std::initializer_list<>) could reuse
> existing nodes rather than reallocating everything. I kept it for a future
A review of the updated patch coming next...