Fix __hash_table::max_size() on 32 bit systems
llvm-svn: 287749
This commit is contained in:
parent
5bdf70f410
commit
341c9dd9c4
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue