How to make a c++11 std::unordered_set of std::weak_ptr
问题 I have a set like this: set<weak_ptr<Node>, owner_less<weak_ptr<Node> > > setName; It works fine. But I would like to change it to an unordered set. However, I get about six pages of errors when I do that. Any ideas how to do that? After looking through all the pages of error messages I found to lines that might help. /usr/include/c++/4.7/bits/functional_hash.h:60:7: error: static assertion failed: std::hash is not specialized for this type /usr/include/c++/4.7/bits/stl_function.h: In