source: doc/papers/general/evaluation/cpp-vstack.hpp @ 3d8f2f8

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 3d8f2f8 was 3d8f2f8, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago

more changes

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