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 // UNSUPPORTED: libcpp-no-exceptions
14 // pointer allocate(size_type n, allocator<void>::const_pointer hint=0);
19 #include "test_macros.h"
22 void test_max(size_t count)
28 } catch (const std::exception &) {
35 // Bug 26812 -- allocating too large
37 test_max<T> (a.max_size() + 1); // just barely too large
38 test_max<T> (a.max_size() * 2); // significantly too large
39 test_max<T> (((size_t) -1) / sizeof(T) + 1); // multiply will overflow
40 test_max<T> ((size_t) -1); // way too large
46 LIBCPP_ONLY(test<const double>());