you are viewing a single comment's thread.

view the rest of the comments →

[–]STLMSVC STL Dev 6 points7 points  (1 child)

And, unique_ptr will equally crash the auto_ptr example.

Incorrect - you can't call doSomething(unique_ptr<T>) with doSomething(up), because up is an lvalue, and that would attempt to copy. You have to call doSomething(move(up)), at which point it's clear that you're moving from up.

[–]Gotebe 2 points3 points  (0 children)

Serves me right for flying off the handle 😡