source: doc/generic_types/evaluation/cpp-vstack.hpp @ 79b8dc3

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 79b8dc3 was 79b8dc3, checked in by Aaron Moss <a3moss@…>, 4 years ago

Some compaction of benchmark code

  • Property mode set to 100644
File size: 455 bytes
Line 
1#pragma once
2
3#include "object.hpp"
4
5class stack {
6        struct node {
7                ptr<object> value;
8                node* next;
9
10                node( const object& v );
11
12                node( ptr<object>&& v, node* n );
13        };
14
15        node* head;
16
17        void copy(const stack& o);
18
19public:
20        void clear();
21
22        stack();
23
24        stack(const stack& o);
25
26        stack(stack&& o);
27
28        ~stack();
29
30        stack& operator= (const stack& o);
31       
32        stack& operator= (stack&& o);
33
34        bool empty() const;
35
36        void push(ptr<object>&& value);
37
38        ptr<object> pop();
39};
Note: See TracBrowser for help on using the repository browser.