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]

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


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.

Tested x86_64-linux.

Paolo.

/////////////////////

Attachment: CL_su_hash
Description: Text document

Attachment: patch_su_hash
Description: Text document


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