[v3] Add hash<shared_ptr> and hash<unique_ptr>

Jonathan Wakely jwakely.gcc@gmail.com
Fri Jun 11 16:24:00 GMT 2010


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?



More information about the Gcc-patches mailing list