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 "../../../stack_allocator.h" 19 main()20int main() 21 { 22 std::stack<int, std::vector<int, stack_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 } 29