Quote Originally Posted by King Mir View Post
Moving a pointer on the grid would ideally look something like this:

Code:
grid[move_to_x][move_to_y] = grid[move_from_x][move_from_y];
grid[move_from_x][move_from_y] = 0;
That's how it'd look with dumb pointers. But, you can't do that with unique_ptrs, because the correct assignment operator is not defined. Shared pointers would actually work. auto_ptr is a perfect fit though, because auto_ptr will do both steps in the assignment; to move an auto_ptr you'd just do this:
Code:
grid[move_to_x][move_to_y] = grid[move_from_x][move_from_y];
That also illustrates why auto_ptr is weird and bad in general. That's not behavior you'd expect from a normal pointer. But it is what you want here.
Very nice and I appreciate that perspective. By your post, I would say auto_ptr still has use when applicable and I will try all the solutions given to this thread.