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

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 1c38f5b was 79b8dc3, checked in by Aaron Moss <a3moss@…>, 7 years ago

Some compaction of benchmark code

  • Property mode set to 100644
File size: 455 bytes
RevLine 
[b276be5]1#pragma once
2
3#include "object.hpp"
4
5class stack {
6        struct node {
[79b8dc3]7                ptr<object> value;
[b276be5]8                node* next;
9
10                node( const object& v );
11
[79b8dc3]12                node( ptr<object>&& v, node* n );
[b276be5]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
[79b8dc3]36        void push(ptr<object>&& value);
[b276be5]37
[79b8dc3]38        ptr<object> pop();
[b276be5]39};
Note: See TracBrowser for help on using the repository browser.