//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. 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)); }