Fix __hash_table::max_size() on 32 bit systems

llvm-svn: 287749
This commit is contained in:
Eric Fiselier 2016-11-23 09:16:12 +00:00
parent 5bdf70f410
commit 341c9dd9c4
2 changed files with 3 additions and 3 deletions

View File

@ -1005,8 +1005,7 @@ public:
size_type max_size() const _NOEXCEPT
{
return std::min<size_type>(
allocator_traits<__pointer_allocator>::max_size(
__bucket_list_.get_deleter().__alloc()),
__node_traits::max_size(__node_alloc()),
numeric_limits<difference_type >::max()
);
}

View File

@ -21,7 +21,8 @@
#include "test_macros.h"
template <class Alloc>
inline size_t alloc_max_size(Alloc const &a) {
inline typename std::allocator_traits<Alloc>::size_type
alloc_max_size(Alloc const &a) {
typedef std::allocator_traits<Alloc> AT;
return AT::max_size(a);
}