blob: 6ec9339bc48ff1abf4c67bc6d20e8279f50a2faf [file] [log] [blame]
Howard Hinnantc52f43e2010-08-22 00:59:46 +00001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnantb64f8b02010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnantc52f43e2010-08-22 00:59:46 +00007//
8//===----------------------------------------------------------------------===//
9
10// <memory>
11
12// allocator:
13// size_type max_size() const throw();
14
15#include <memory>
16#include <limits>
17#include <cstddef>
18#include <cassert>
19
20int new_called = 0;
21
22int main()
23{
24 const std::allocator<int> a;
Dan Albert1d4a1ed2016-05-25 22:36:09 -070025 std::size_t M = a.max_size() * sizeof(int);
26 assert(M > 0xFFFF && M <= std::numeric_limits<std::size_t>::max());
Howard Hinnantc52f43e2010-08-22 00:59:46 +000027}