Library 1

This commit is contained in:
Alessandro Ferro
2021-06-09 09:11:32 +02:00
parent 64e7c6bcd1
commit 05da596510

View File

@@ -167,7 +167,7 @@ void List<Data>::InsertAtBack(const Data& data){
template <typename Data>
void List<Data>::InsertAtBack(Data&& data){
if(size == 0){
InsertAtFront(data);
InsertAtFront(std::move(data));
}
else{
struct Node* last = new Node(std::move(data));