MCPcopy Create free account
hub / github.com/anthonywilliams/ccia_code_samples / push

Method push

listings/listing_6.5.cpp:35–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 }
34
35 void push(T new_value)
36 {
37 std::shared_ptr<T> new_data(
38 std::make_shared<T>(std::move(new_value)));
39 std::unique_ptr<node> p(new node);
40 tail->data=new_data;
41 node* const new_tail=p.get();
42 tail->next=std::move(p);
43 tail=new_tail;
44 }
45};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected