summaryrefslogtreecommitdiff
path: root/include/memory
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-10-25 19:34:04 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-10-25 19:34:04 +0000
commit88fa03a06e41b601c56d5696d81c08462ba820a6 (patch)
treec0dde3473b6e07ad9518c83358700bdfb808d53c /include/memory
parent175cb20bfb8e186241dd54ed9a80adc5931f344d (diff)
Add a test for LWG#2466: allocator_traits::max_size() default behavior is incorrect
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/memory')
-rw-r--r--include/memory2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/memory b/include/memory
index 97ad44036..04d57d5d7 100644
--- a/include/memory
+++ b/include/memory
@@ -1678,7 +1678,7 @@ private:
{return __a.max_size();}
_LIBCPP_INLINE_VISIBILITY
static size_type __max_size(false_type, const allocator_type&)
- {return numeric_limits<size_type>::max();}
+ {return numeric_limits<size_type>::max() / sizeof(value_type);}
_LIBCPP_INLINE_VISIBILITY
static allocator_type