1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
13 // struct hash<shared_ptr<T>>
15 // typedef shared_ptr<T> argument_type;
16 // typedef size_t result_type;
17 // size_t operator()(const shared_ptr<T>& p) const;
23 #if TEST_STD_VER >= 11
24 #include "poisoned_hash_helper.hpp"
33 std::shared_ptr<int> p(ptr);
34 std::hash<std::shared_ptr<int> > f;
36 assert(h == std::hash<int*>()(ptr));
38 #if TEST_STD_VER >= 11
40 test_hash_enabled_for_type<std::shared_ptr<int>>();
41 test_hash_enabled_for_type<std::shared_ptr<A>>();