Installation of CityHash by Craig Silverstein

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@146329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2011-12-10 20:28:56 +00:00
parent 40c13d31c5
commit c00f75dc75
3 changed files with 170 additions and 43 deletions

View File

@@ -3916,7 +3916,7 @@ template<class _Ptr>
size_t _LIBCPP_INLINE_VISIBILITY __do_string_hash(_Ptr __p, _Ptr __e)
{
typedef typename iterator_traits<_Ptr>::value_type value_type;
return __murmur2<size_t>()(__p, (__e-__p)*sizeof(value_type));
return __murmur2_or_cityhash<size_t>()(__p, (__e-__p)*sizeof(value_type));
}
template<class _CharT, class _Traits, class _Allocator>