mirror of
https://github.com/opnsense/src.git
synced 2026-02-22 09:21:31 -05:00
27 lines
581 B
C++
27 lines
581 B
C++
|
|
//===----------------------------------------------------------------------===//
|
||
|
|
//
|
||
|
|
// The LLVM Compiler Infrastructure
|
||
|
|
//
|
||
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
||
|
|
// Source Licenses. See LICENSE.TXT for details.
|
||
|
|
//
|
||
|
|
//===----------------------------------------------------------------------===//
|
||
|
|
|
||
|
|
// <stack>
|
||
|
|
|
||
|
|
// reference top();
|
||
|
|
|
||
|
|
#include <stack>
|
||
|
|
#include <cassert>
|
||
|
|
|
||
|
|
int main()
|
||
|
|
{
|
||
|
|
std::stack<int> q;
|
||
|
|
assert(q.size() == 0);
|
||
|
|
q.push(1);
|
||
|
|
q.push(2);
|
||
|
|
q.push(3);
|
||
|
|
int& ir = q.top();
|
||
|
|
assert(ir == 3);
|
||
|
|
}
|