Fix __hash_table::max_size() on 32 bit systems
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287749 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user