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
This commit is contained in:
Marshall Clow
2015-10-25 19:34:04 +00:00
parent 175cb20bfb
commit 88fa03a06e
3 changed files with 4 additions and 5 deletions

View File

@@ -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