Author: ericwf Date: Fri Jan 20 18:57:29 2017 New Revision: 292689 URL: http://llvm.org/viewvc/llvm-project?rev=292689&view=rev Log: Fix recent build errors
Modified: libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp libcxx/trunk/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp libcxx/trunk/test/support/poisoned_hash_helper.hpp Modified: libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp?rev=292689&r1=292688&r2=292689&view=diff ============================================================================== --- libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp (original) +++ libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp Fri Jan 20 18:57:29 2017 @@ -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 {}; Modified: libcxx/trunk/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp?rev=292689&r1=292688&r2=292689&view=diff ============================================================================== --- libcxx/trunk/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp (original) +++ libcxx/trunk/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp Fri Jan 20 18:57:29 2017 @@ -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 } Modified: libcxx/trunk/test/support/poisoned_hash_helper.hpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/poisoned_hash_helper.hpp?rev=292689&r1=292688&r2=292689&view=diff ============================================================================== --- libcxx/trunk/test/support/poisoned_hash_helper.hpp (original) +++ libcxx/trunk/test/support/poisoned_hash_helper.hpp Fri Jan 20 18:57:29 2017 @@ -163,7 +163,7 @@ void test_hash_enabled(InputKey const& k 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)); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits