source: doc/generic_types/evaluation/cpp-vstack.hpp @ 33e22da

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 33e22da was a381b46, checked in by Aaron Moss <a3moss@…>, 5 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
4class 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);
15public:
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.