1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // XFAIL: libcpp-no-exceptions
13 // size_type max_size() const;
18 #include "min_allocator.h"
24 assert(s.max_size() >= s.size());
26 const size_t sz = s2.max_size() + 1;
27 try { s2.resize(sz, 'x'); }
28 catch ( const std::length_error & ) { return ; }
35 typedef std::string S;
38 test(S("12345678901234567890123456789012345678901234567890"));
40 #if __cplusplus >= 201103L
42 typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
45 test(S("12345678901234567890123456789012345678901234567890"));