//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template // struct hash> // { // typedef shared_ptr argument_type; // typedef size_t result_type; // size_t operator()(const shared_ptr& p) const; // }; #include #include int main() { int* ptr = new int; std::shared_ptr p(ptr); std::hash > f; std::size_t h = f(p); assert(h == std::hash()(ptr)); }