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

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since d9dd3d1 was b276be5, checked in by Aaron Moss <a3moss@…>, 5 years ago

Further updates to benchmarks (new C++ virtual benchmark still slightly broken)

  • Property mode set to 100644
File size: 503 bytes
Line 
1#pragma once
2
3#include "object.hpp"
4
5class stack {
6        struct node {
7                std::unique_ptr<object> value;
8                node* next;
9
10                node( const object& v );
11
12                node( std::unique_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(std::unique_ptr<object>&& value);
37
38        std::unique_ptr<object> pop();
39};
Note: See TracBrowser for help on using the repository browser.