ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since c57d1935 was
a381b46,
checked in by Aaron Moss <a3moss@…>, 7 years ago
|
Minor cleanup, also filled in benchmark source appendix
|
-
Property mode set to
100644
|
File size:
442 bytes
|
Line | |
---|
1 | #pragma once |
---|
2 | #include "object.hpp" |
---|
3 | |
---|
4 | class stack { |
---|
5 | struct node { |
---|
6 | ptr<object> value; |
---|
7 | node* next; |
---|
8 | |
---|
9 | node( const object& v ); |
---|
10 | node( ptr<object>&& v, node* n ); |
---|
11 | }; |
---|
12 | node* head; |
---|
13 | |
---|
14 | void copy(const stack& o); |
---|
15 | public: |
---|
16 | stack(); |
---|
17 | stack(const stack& o); |
---|
18 | stack(stack&& o); |
---|
19 | ~stack(); |
---|
20 | stack& operator= (const stack& o); |
---|
21 | stack& operator= (stack&& o); |
---|
22 | |
---|
23 | void clear(); |
---|
24 | bool empty() const; |
---|
25 | void push(ptr<object>&& value); |
---|
26 | ptr<object> pop(); |
---|
27 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.