This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: unordered set design modification
- 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: Sun, 21 Oct 2012 17:21:05 +0100
- Subject: Re: unordered set design modification
- References: <5083127B.6050306@gmail.com>
On 20 October 2012 22:07, François Dumont wrote:
> Hi
>
> Following remarks in PR 53067 regarding design of unordered containers
Which remarks specifically?
My understanding was that Paolo's suggestion to redesign things was to
avoid public inheritance, which we now do anyway.
> here is a patch to prefer aggregation to inheritance with _Hashtable. I hope
> it is what you had in mind Jonathan. If so I will do the same for
> unordered_[multi]map.
Are you referring to my comments in the "hashtable local iterator"
thread last December? Because IIRC my concern was about deriving from
the user-supplied Hash and Pred types and this new patch doesn't alter
that. What is the advantage of this new patch?
(Apologies if I'm forgetting some other suggestion of mine.)
I think my concerns about deriving from user-supplied types are
addressed by using the EBO helper (which prevents deriving from types
with virtual functions, as the vptr makes the class non-empty) and by
using private inheritance.