Ignore:
Timestamp:
Apr 17, 2017, 3:47:07 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
4ae83a4b
Parents:
33e22da
Message:

Final version of the benchmark code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/cpp-stack.hpp

    r33e22da rc87cd93  
    77                node* next;
    88
    9                 node( T& v ) : value(v), next(nullptr) {}
    10                 node( T&& v, node* n ) : value(std::move(v)), next(n) {}
     9                node( const T& v, node* n = nullptr ) : value(v), next(n) {}
    1110        };
    1211        node* head;
     
    5453        bool empty() const { return head == nullptr; }
    5554
    56         void push(T&& value) { head = new node{ std::move(value), head };  /***/ }
     55        void push(const T& value) { head = new node{ value, head };  /***/ }
    5756
    5857        T pop() {
Note: See TracChangeset for help on using the changeset viewer.