This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] PR libstdc++/90388 fix std::hash<unique_ptr<T,D>> bugs
- From: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 11 May 2019 00:51:10 +0300
- Subject: Re: [PATCH] PR libstdc++/90388 fix std::hash<unique_ptr<T,D>> bugs
- References: <20190510214147.GA18999@redhat.com>
On Sat, 11 May 2019 at 00:42, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> A disabled specialization should not be callable, so move the function
> call operator into a new base class which correctly implements the
> disabled hash semantics. For the versioned namespace configuration do
> not derive from __poison_hash in the enabled case, as the empty base
> class serves no purpose but potentially increases the object size. For
> the default configuration that base class must be kept, to preserve
> layout.
I continue to not be a fan of the versioned namespace ifdeffery in
this, but I can live with it.