summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-01-21 00:57:29 +0000
committerEric Fiselier <eric@efcs.ca>2017-01-21 00:57:29 +0000
commitd9e1631d2326ec60881fb637c5287d16f321a007 (patch)
treeef3878e872531758d4ad3695ffb688b90f2e3306 /libcxx/test/std/utilities
parent6620376da79f7ee91f71cf93c5921fb8f406f71c (diff)
downloadbcm5719-llvm-d9e1631d2326ec60881fb637c5287d16f321a007.tar.gz
bcm5719-llvm-d9e1631d2326ec60881fb637c5287d16f321a007.zip
Fix recent build errors
llvm-svn: 292689
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r--libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp7
-rw-r--r--libcxx/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp2
2 files changed, 7 insertions, 2 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
}
OpenPOWER on IntegriCloud