//===----------------------------------------------------------------------===// // // 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 unique_ptr argument_type; // typedef size_t result_type; // size_t operator()(const unique_ptr& p) const; // }; #include #include int main() { int* ptr = new int; std::unique_ptr p(ptr); std::hash > f; std::size_t h = f(p); assert(h == std::hash()(ptr)); }