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

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 33e22da 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
RevLine 
[b276be5]1#pragma once
2#include "object.hpp"
3
4class stack {
5        struct node {
[79b8dc3]6                ptr<object> value;
[b276be5]7                node* next;
8
9                node( const object& v );
[79b8dc3]10                node( ptr<object>&& v, node* n );
[b276be5]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
[a381b46]23        void clear();
[b276be5]24        bool empty() const;
[79b8dc3]25        void push(ptr<object>&& value);
26        ptr<object> pop();
[b276be5]27};
Note: See TracBrowser for help on using the repository browser.