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-vstack.cpp

    r33e22da rc87cd93  
    22#include <utility>
    33
    4 stack::node::node( const object& v ) : value( v.new_copy() ), next( nullptr ) {}
    5 stack::node::node( ptr<object>&& v, node* n ) : value( std::move(v) ), next( n ) {}
     4stack::node::node( const object& v, node* n ) : value( v.new_copy() ), next( n ) {}
    65
    76void stack::copy(const stack& o) {
     
    4847bool stack::empty() const { return head == nullptr; }
    4948
    50 void stack::push(ptr<object>&& value) { head = new node{ std::move(value), head }; /***/ }
     49void stack::push(const object& value) { head = new node{ value, head }; /***/ }
    5150
    5251ptr<object> stack::pop() {
Note: See TracChangeset for help on using the changeset viewer.