This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add std::unordered_* C++11 allocator support

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:
> Hello
>     I think I have completed support of C++11 allocators in unordered
> containers.


>     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/ 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
> patch.

That's fine.

A review of the updated patch coming next...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]