1

switch arraylist to unique_ptr

This commit is contained in:
2022-07-19 21:59:00 +02:00
parent b7070b522a
commit fea927380e
2 changed files with 11 additions and 11 deletions

View File

@ -32,7 +32,6 @@ void SmartPointerDemo::run() {
log << INFO << "*ptr1 == " << *ptr1 << ", (bool)ptr2 == " << (bool)ptr2 << endl;
log << INFO << "Moving ptr1 => ptr2 (no allocations should happen)..." << endl;
// ptr2 = ptr1; // Doesn't work, copy assignment is deleted
ptr2 = std::move(ptr1);
log << INFO << "(bool)ptr1 == " << (bool)ptr1 << ", *ptr2 == " << *ptr2 << endl;