This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] Add hash<shared_ptr> and hash<unique_ptr>
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 11 Jun 2010 17:06:05 +0100
- Subject: Re: [v3] Add hash<shared_ptr> and hash<unique_ptr>
- References: <4C125D99.4090109@oracle.com>
On 11 June 2010 17:00, Paolo Carlini wrote:
> Hi all, hi Jon,
>
> I'm about to commit this patch adding two missing std::hash
> specializations...
>
> Jon, skimming through unique_ptr.h I don't really understand why we are
> using std::tuple instead of the *much* simpler std::pair. Can you? I
> think that otherwise we should consider changing that, even if that
> means breaking the "ABI" for people already experimenting with the C++0x
> unique_ptr, because in the future it will be more and more difficult...
> If we can avoid using tuple in unique_ptr, I think <memory> can be made
> *much* smaller (it used to be very small), because I'm pretty sure we
> don't need the entire <functional>, only some bits, like
> functional_hash, and very little else.
Does our tuple benefit from the EBO if the deleter is empty?