This is the mail archive of the libstdc++@gcc.gnu.org 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]

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


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