diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-01-21 00:57:29 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-01-21 00:57:29 +0000 |
| commit | d9e1631d2326ec60881fb637c5287d16f321a007 (patch) | |
| tree | ef3878e872531758d4ad3695ffb688b90f2e3306 /libcxx | |
| parent | 6620376da79f7ee91f71cf93c5921fb8f406f71c (diff) | |
| download | bcm5719-llvm-d9e1631d2326ec60881fb637c5287d16f321a007.tar.gz bcm5719-llvm-d9e1631d2326ec60881fb637c5287d16f321a007.zip | |
Fix recent build errors
llvm-svn: 292689
Diffstat (limited to 'libcxx')
3 files changed, 8 insertions, 3 deletions
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp index f989a017348..879ea405c75 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp @@ -46,13 +46,16 @@ void test_disabled_with_deleter() { test_hash_disabled_for_type<pointer>(); } +namespace std { + template <class T> -struct std::hash<min_pointer<T, std::integral_constant<size_t, 1>>> { - size_t operator()(min_pointer<T, std::integral_constant<size_t, 1>> p) const { +struct hash<::min_pointer<T, std::integral_constant<size_t, 1>>> { + size_t operator()(::min_pointer<T, std::integral_constant<size_t, 1>> p) const { if (!p) return 0; return std::hash<T*>{}(std::addressof(*p)); } }; +} struct A {}; diff --git a/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp index 0fe020bf3d4..9ab58ea6c3a 100644 --- a/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp @@ -30,7 +30,9 @@ int main() static_assert((std::is_same<typename H::argument_type, std::type_index>::value), "" ); static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" ); } +#if TEST_STD_VER >= 11 { test_hash_enabled_for_type<std::type_index>(std::type_index(typeid(int))); } +#endif } diff --git a/libcxx/test/support/poisoned_hash_helper.hpp b/libcxx/test/support/poisoned_hash_helper.hpp index 0a5675a2c5a..e8a2d8c3a59 100644 --- a/libcxx/test/support/poisoned_hash_helper.hpp +++ b/libcxx/test/support/poisoned_hash_helper.hpp @@ -163,7 +163,7 @@ void test_hash_enabled(InputKey const& key) { static_assert(can_hash<Hash(ConvertibleTo<Key> &&)>(), ""); static_assert(can_hash<Hash(ConvertibleTo<Key> const&&)>(), ""); - const Hash h; + const Hash h{}; assert(h(key) == h(key)); } |

