From e04194100705b33e50125fe4cba076e88bb43907 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 23 Nov 2016 09:16:12 +0000 Subject: [PATCH] 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 --- include/__hash_table | 3 +-- test/support/test_allocator.h | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/__hash_table b/include/__hash_table index 0dc188b7a..2653afb8d 100644 --- a/include/__hash_table +++ b/include/__hash_table @@ -1005,8 +1005,7 @@ public: size_type max_size() const _NOEXCEPT { return std::min( - allocator_traits<__pointer_allocator>::max_size( - __bucket_list_.get_deleter().__alloc()), + __node_traits::max_size(__node_alloc()), numeric_limits::max() ); } diff --git a/test/support/test_allocator.h b/test/support/test_allocator.h index 7ce60025f..578b69ddc 100644 --- a/test/support/test_allocator.h +++ b/test/support/test_allocator.h @@ -21,7 +21,8 @@ #include "test_macros.h" template -inline size_t alloc_max_size(Alloc const &a) { +inline typename std::allocator_traits::size_type +alloc_max_size(Alloc const &a) { typedef std::allocator_traits AT; return AT::max_size(a); }