]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/containers/container.adaptors/stack/stack.cons/ctor_default.pass.cpp
Vendor import of libc++ trunk r290819:
[FreeBSD/FreeBSD.git] / test / std / containers / container.adaptors / stack / stack.cons / ctor_default.pass.cpp
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // <stack>
11
12 // stack();
13
14 #include <stack>
15 #include <vector>
16 #include <cassert>
17
18 #include "test_allocator.h"
19
20 int main()
21 {
22     std::stack<int, std::vector<int, limited_allocator<int, 10> > > q;
23     assert(q.size() == 0);
24     q.push(1);
25     q.push(2);
26     assert(q.size() == 2);
27     assert(q.top() == 2);
28 }